Changing decoy label from X!Tandem

12 views
Skip to first unread message

Tim Van Den Bossche

unread,
Mar 12, 2018, 8:23:41 AM3/12/18
to pyte...@googlegroups.com

Dear,

 

In X!Tandem and Pyteomics, the default label for labeling decoys is the “DECOY_” prefix, as indicated by the is_decoy function. I was wondering how I can change this tag to another suffix, without digging into the source code?

For example, I would like to indicate the following:

Ftf = tandem.filter(“example.t.xml”, fdr=0.01, id_decoy=”REVERSED”) # “REVERSED” is the label which is attached to all decoy fasta headers at the end of the header

 

Best,

Tim

 

Mark Ivanov

unread,
Mar 12, 2018, 9:08:20 AM3/12/18
to Pyteomics
Dear Tim,

Thank you for pointing this issue!

Right now you can overcame it in this way:

suffix = ':reversed' # Default X!Tandem suffix
is_decoy_func = lambda x: all(prot['label'].endswith(suffix) for prot in x['protein'])
Ftf = tandem.filter(“example.t.xml”, fdr=0.01, is_decoy=is_decoy_func)

Or if you wish to use prefix:

prefix = 'Custom_decoy_'
is_decoy_func = lambda x: all(prot['label'].startswith(prefix) for prot in x['protein'])
Ftf = tandem.filter(“example.t.xml”, fdr=0.01, is_decoy=is_decoy_func)

We understand that it is not very convenient and probably will add additional options to filter function soon.

Regards,
Mark
Reply all
Reply to author
Forward
0 new messages