Skip to content

Osw parser/include identifying - #1

Open
singjc wants to merge 33 commits into
LLYX:masterfrom
singjc:osw_parser/include_identifying
Open

Osw parser/include identifying#1
singjc wants to merge 33 commits into
LLYX:masterfrom
singjc:osw_parser/include_identifying

Conversation

@singjc

@singjc singjc commented Jul 17, 2020

Copy link
Copy Markdown
Collaborator

OSW Parser Include/Exclude Identifying/ Detecting

I made some changes to only the osw_parser.py file, to allow for specifically only extracting detecting transitions (default) or to also include identifying transitions in the extraction. The changes for extracting/excluding detecting/identifying transitions was made to the get_transition_ids_and_library_intensities_from_prec_id definition.

I also added a flag to allow for unique chromatogram file names.

I added the following flags:

  • --chrom_name_wildcard - this by default is set to output.sqMass, this assumes all chromatograms have the same name of output.sqMass. The other special option is to set the flag to unique, this will get the unique individual chromatogram filenames in the run folders provided in --in_folder, see L#605-L612 and L#15-L21
  • --no_detecting - the default for not setting this flag is false, this means that detecting transitions will be extracted by default. If this flag is set, then no detecting transitions will be extracted. This might be useful if you want to only extract identifying transitions.
  • --identifying - the default for not setting this flag is false, this means that identifying transitions will not be extracted by default. If this flag is set, then identifying transitions will be extracted.

Example

python $source_dir/osw_parser.py --in_folder $in_folder --chrom_name_wildcard unique --identifying --no_detecting --out synth_phos_600s_175pts --osw_dir $osw_dir --osw_in $osw_in --isotopes 0 --window_size 175 --scored --use_rt --mode npy

@singjc
singjc requested a review from LLYX July 17, 2020 05:40

@LLYX LLYX left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good, can you also change the vstack into stack during npy saving for chromatograms as discussed?

Comment thread utils/osw_parser.py
Comment thread utils/osw_parser.py Outdated
Comment thread utils/osw_parser.py Outdated
singjc added 2 commits July 21, 2020 14:59
…efactored get_chromatogram_filename to get actual last modified chrom file if more than one is present
…inary labels that map to the chromatogram_csv output from osw_parser.py
@singjc

singjc commented Jul 21, 2020

Copy link
Copy Markdown
Collaborator Author

Generating a Ground Truth Binary Label Array

I have also added gen_ground_truth_labels.py, which can be used to generate a ground truth binary label array.

I use the ...chromatogram_csv.csv output file from osw_parser.py, specifically I use the Filename column to get the peptide sequences using str.split("_").
The ground truth file should just be a plain string vector of known peptide sequences that are present in the dataset. These are usually synthetic spiked in peptides.

Example

python $source_dir/gen_ground_truth_labels.py --in_chrom_csv synth_phos_600s_175pts_chromatograms_csv.csv --in_truth IPF_Supp_Table1.txt

Comment thread utils/osw_parser.py Outdated
@singjc singjc added the enhancement New feature or request label Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants