diff --git a/ProteoFileReader.pyc b/ProteoFileReader.pyc new file mode 100755 index 0000000..67a4ba4 Binary files /dev/null and b/ProteoFileReader.pyc differ diff --git a/fragpair_scoring.pyc b/fragpair_scoring.pyc new file mode 100755 index 0000000..15fc921 Binary files /dev/null and b/fragpair_scoring.pyc differ diff --git a/gui.pyc b/gui.pyc new file mode 100755 index 0000000..e08c823 Binary files /dev/null and b/gui.pyc differ diff --git a/mass_recal.py b/mass_recal.py index 77db412..f690518 100755 --- a/mass_recal.py +++ b/mass_recal.py @@ -34,7 +34,15 @@ def run_xi_lin(peakfile, fasta, cnf, outpath, xipath, threads='1'): def get_ppm_error(xi_df, outfile): - xi_df = xi_df[(xi_df.decoy == 0) & (xi_df['match score'] > 6)] # TODO: new xi version requires lower score? + score_cutoff = 2 + xi_df = xi_df[(xi_df.decoy == 0) & (xi_df['match score'] > score_cutoff)] + xi_df_decoy = xi_df[(xi_df.decoy == 1) & (xi_df['match score'] > score_cutoff)] + + while (len(xi_df_decoy.index)>0.02*len(xi_df.index)) + score_cutoff=min(xi_df['match score'][xi_df['match score'] > score_cutoff]); + xi_df = xi_df[(xi_df.decoy == 0) & (xi_df['match score'] > score_cutoff)] + xi_df_decoy = xi_df[(xi_df.decoy == 1) & (xi_df['match score'] > score_cutoff)] + median_err = np.median(xi_df['Precoursor Error']) try: @@ -134,7 +142,7 @@ def main(mgf, fasta, xi_cnf, outpath, threads, xi_jar='./resources/XiSearch_1.6. fasta = '//130.149.167.198/rappsilbergroup/users/MitoProject/For Swantje/20170109_uniprot_mitoIDrun_FASTA.fasta' outpath = base_dir + '/error_shift' for in_file in os.listdir(mgf_dir): - if '.mgf' in in_file: + if in_file.endswith('.mgf') and not in_file.startswith('recal_') : main(mgf=os.path.join(mgf_dir, in_file), fasta=fasta, xi_cnf='D:/user/Swantje/projects/pipeline_prepro_xi_fdr/resources/xi_linear_by_tryp.conf', diff --git a/mass_recal.pyc b/mass_recal.pyc new file mode 100755 index 0000000..9af08c1 Binary files /dev/null and b/mass_recal.pyc differ diff --git a/mass_recal_ms2.py b/mass_recal_ms2.py index 0e98881..f33bfc7 100755 --- a/mass_recal_ms2.py +++ b/mass_recal_ms2.py @@ -35,7 +35,15 @@ def run_xi_lin(peakfile, fasta, cnf, outpath, xipath, threads='1'): def get_ppm_error(xi_df, peaks_df, outfile): - xi_df = xi_df[(xi_df.decoy == 0) & (xi_df['match score'] > 6)] + score_cutoff = 2 + xi_df = xi_df[(xi_df.decoy == 0) & (xi_df['match score'] > score_cutoff)] + xi_df_decoy = xi_df[(xi_df.decoy == 1) & (xi_df['match score'] > score_cutoff)] + + while (len(xi_df_decoy.index)>0.02*len(xi_df.index)): + score_cutoff=min(xi_df['match score'][xi_df['match score'] > score_cutoff]); + xi_df = xi_df[(xi_df.decoy == 0) & (xi_df['match score'] > score_cutoff)] + xi_df_decoy = xi_df[(xi_df.decoy == 1) & (xi_df['match score'] > score_cutoff)] + median_err = np.median(xi_df['Precoursor Error']) try: fig, ax = plt.subplots() @@ -156,7 +164,7 @@ def main(mgf, fasta, xi_cnf, outpath, threads, xi_jar='./resources/XiSearch_1.6. fasta = '//130.149.167.198/rappsilbergroup/users/MitoProject/For Swantje/20170109_uniprot_mitoIDrun_FASTA.fasta' outpath = base_dir + '/error_shift' for in_file in os.listdir(mgf_dir): - if '.mgf' in in_file: + if in_file.endswith('.mgf') and not in_file.startswith('recal_'): main(mgf=os.path.join(mgf_dir, in_file), fasta=fasta, xi_cnf='D:/user/Swantje/projects/pipeline_prepro_xi_fdr/resources/xi_linear_by_tryp.conf', diff --git a/preprocessing.py b/preprocessing.py index 6ae04b3..bdf25d0 100755 --- a/preprocessing.py +++ b/preprocessing.py @@ -300,7 +300,7 @@ def process_file(filepath, outdir, mscon_settings, split_acq, detector_filter, m pool.close() pool.join() - recal_in = [os.path.join(outdir, x) for x in os.listdir(outdir) if '.mgf' in x] + recal_in = [os.path.join(outdir, x) for x in os.listdir(outdir) if x.endswith('.mgf') and not x.startswith('recal_')] if recal: # pool = Pool(processes=nthr) if not os.path.exists(outdir): diff --git a/preprocessing.pyc b/preprocessing.pyc new file mode 100755 index 0000000..daab717 Binary files /dev/null and b/preprocessing.pyc differ diff --git a/preprocessing_ms2recal.py b/preprocessing_ms2recal.py index 558e25a..49c02c4 100755 --- a/preprocessing_ms2recal.py +++ b/preprocessing_ms2recal.py @@ -300,7 +300,7 @@ def process_file(filepath, outdir, mscon_settings, split_acq, detector_filter, m pool.close() pool.join() - recal_in = [os.path.join(outdir, x) for x in os.listdir(outdir) if '.mgf' in x] + recal_in = [os.path.join(outdir, x) for x in os.listdir(outdir) if x.endswith('.mgf') and not x.startswith('recal_')] if recal: # pool = Pool(processes=nthr) if not os.path.exists(outdir):