Skip to content

Commit 9737388

Browse files
committed
Change "iRT" to "Biognosys_iRT" to make the meaning clear.
1 parent 135f29b commit 9737388

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

MSFragger-GUI/src/com/dmtavt/fragpipe/tools/speclibgen/SpeclibPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private JPanel createPanelEasypqp() {
153153

154154
final String optionAuto = "Automatic selection of a run as reference RT";
155155
final String optionManual = "User provided RT calibration file";
156-
pqpCal = Arrays.asList(optionAuto, "iRT", "ciRT", "Pierce_iRT", optionManual);
156+
pqpCal = Arrays.asList(optionAuto, "Biognosys_iRT", "ciRT", "Pierce_iRT", optionManual);
157157
pqpType = Arrays.asList(EASYPQP_TIMSTOF, "non-timsTOF");
158158

159159
uiComboPqpCal = UiUtils.createUiCombo(pqpCal);
@@ -406,7 +406,7 @@ public String getEasypqpDataType() {
406406
}
407407

408408
public String getEasypqpCalOption() {
409-
return new String[]{"noiRT", "iRT", "ciRT", "Pierce_iRT", "a tsv file"}[uiComboPqpCal.getSelectedIndex()];
409+
return new String[]{"noiRT", "Biognosys_iRT", "ciRT", "Pierce_iRT", "a tsv file"}[uiComboPqpCal.getSelectedIndex()];
410410
}
411411
public String getEasypqpIMCalOption() {
412412
return new String[]{"noIM", "a tsv file"}[uiComboPqpIMCal.getSelectedIndex()];

MSFragger-GUI/src/com/dmtavt/fragpipe/ui.translations

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ptmshepherd.precursor_mass_units :: Da <=> 0
6868
speclibgen.easypqp.data-type :: timsTOF <=> timsTOF
6969
speclibgen.easypqp.data-type :: non-timsTOF <=> non-timsTOF
7070
speclibgen.easypqp.rt-cal :: Automatic selection of a run as reference RT <=> noiRT
71-
speclibgen.easypqp.rt-cal :: iRT <=> iRT
71+
speclibgen.easypqp.rt-cal :: Biognosys_iRT <=> Biognosys_iRT
7272
speclibgen.easypqp.rt-cal :: ciRT <=> ciRT
7373
speclibgen.easypqp.rt-cal :: Pierce_iRT <=> Pierce_iRT
7474
speclibgen.easypqp.rt-cal :: User provided RT calibration file <=> a tsv file

MSFragger-GUI/tools/speclib/gen_con_spec_lib.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def configure_logger(lg: logging.Logger) -> None:
4141

4242
class Irt_choice(enum.Enum):
4343
no_iRT = enum.auto()
44-
iRT = enum.auto()
44+
Biognosys_iRT = enum.auto()
4545
ciRT = enum.auto()
4646
Pierce_iRT = enum.auto()
4747
userRT = enum.auto()
@@ -74,7 +74,7 @@ def resolve_mapped(path) -> str:
7474
if len(sys.argv) >= 9:
7575
rta, ima = sys.argv[8].split(os.pathsep)
7676
no_iRT = rta.casefold() == 'noirt'
77-
is_iRT = rta.casefold() == 'irt'
77+
is_Biognosys_iRT = rta.casefold() == 'Biognosys_iRT'.casefold()
7878
is_ciRT = rta.casefold() == 'cirt'
7979
is_Pierce_iRT = rta.casefold() == 'Pierce_iRT'.casefold()
8080
is_userRT = pathlib.Path(rta).exists()
@@ -83,7 +83,7 @@ def resolve_mapped(path) -> str:
8383
is_userIM = pathlib.Path(ima).exists()
8484
userIM_file = pathlib.Path(ima).resolve(strict=True) if is_userIM else None
8585
irt_choice = Irt_choice.no_iRT if no_iRT else \
86-
Irt_choice.iRT if is_iRT else \
86+
Irt_choice.Biognosys_iRT if is_Biognosys_iRT else \
8787
Irt_choice.ciRT if is_ciRT else \
8888
Irt_choice.Pierce_iRT if is_Pierce_iRT else \
8989
Irt_choice.userRT if userRT_file else \
@@ -427,15 +427,11 @@ def get_pep_ion_minprob(opt: Filter_option, philosopher_filter_log: str = None):
427427
# 'im':
428428
})
429429
for i in range(1, 8)]
430-
irt_df = pd.concat(dd).reset_index(drop=True)
430+
Biognosys_iRT_df = pd.concat(dd).reset_index(drop=True)
431+
431432
irt_file = workdir / 'irt.tsv'
432433
im_file = workdir / 'im.tsv'
433-
'''easypqp convert --pepxml 1.pep_xml --spectra 1.mgf --exclude-range -1.5,3.5
434-
easypqp convert --pepxml 2.pep_xml --spectra 2.mgf --exclude-range -1.5,3.5'''
435-
'easypqp convert --pepxml interact.pep.xml --spectra 1.mgf --unimod unimod.xml --exclude-range -1.5,3.5'
436-
f'easypqp library --psmtsv {psm_tsv_file} --rt_reference {irt_file} --out out.tsv *.psmpkl *.peakpkl'
437-
# https://github.com/grosenberger/easypqp/blob/master/easypqp/data/unimod.xml?raw=true
438-
# http://www.unimod.org/xml/unimod.xml
434+
439435
from typing import List
440436
def pairing_pepxml_spectra_v3(spectras: List[pathlib.PurePath], pep_xmls: List[pathlib.PurePath]):
441437
rec = re.compile('(.+?)(?:_(?:un)?calibrated)?')
@@ -471,6 +467,8 @@ def get_rank(name):
471467
use_iRT = irt_choice is not Irt_choice.no_iRT
472468
use_im = im_choice is not Im_choice.no_im
473469
filelist_arg = [resolve_mapped(filelist_easypqp_library)]
470+
471+
474472
def easypqp_library_cmd(use_irt: bool, use_im: bool):
475473
return [resolve_mapped(easypqp), 'library',
476474
'--psmtsv', resolve_mapped(psm_tsv_file), '--peptidetsv', resolve_mapped(peptide_tsv_file), ] + \
@@ -547,20 +545,23 @@ def main_easypqp():
547545
workdir.mkdir(exist_ok=overwrite)
548546
output_directory = workdir / 'easypqp_files'
549547
output_directory.mkdir(exist_ok=overwrite)
550-
if irt_choice is Irt_choice.iRT:
551-
irt_df.to_csv(irt_file, index=False, sep='\t', lineterminator='\n')
548+
if irt_choice is Irt_choice.Biognosys_iRT:
549+
Biognosys_iRT_df.to_csv(irt_file, index=False, sep='\t', lineterminator='\n')
552550
elif irt_choice is Irt_choice.ciRT:
553551
shutil.copyfile(script_dir / 'hela_irtkit.tsv', irt_file)
554552
elif irt_choice is Irt_choice.Pierce_iRT:
555553
shutil.copyfile(script_dir / 'Pierce_iRT.tsv', irt_file)
556554
elif irt_choice is Irt_choice.userRT:
557555
shutil.copyfile(userRT_file, irt_file)
556+
558557
if im_choice is Im_choice.userIM:
559558
shutil.copyfile(userIM_file, im_file)
559+
560560
print(f'''Spectral library building
561561
Commands to execute:
562562
{allcmds}
563563
{'~' * 69}''', flush=True)
564+
564565
(output_directory / 'cmds.txt').write_text(allcmds)
565566
subprocess.run([os.fspath(easypqp), '--version'], check=True)
566567
procs = []

0 commit comments

Comments
 (0)