Ejemplo n.º 1
0
#!/usr/bin/python
import os
import sys
import stat
import massspec_toolbox_config as conf

(db_name, filename_fasta) = conf.get_dbinfo()
current_dirname = os.getcwd()

tandem_bin = conf.get_TPP_path('tandem.exe')
tandem2xml_bin = conf.get_TPP_path('Tandem2XML')
filename_fasta_pro = filename_fasta+'.pro'

filename_param_abs = '/home/taejoon/massspec-toolbox/config/tandem-isb_input_native.xml'

def tandem_taxonomy_xml(dbname=None, fasta_pro=None):
    xml_list = []
    xml_list.append('<?xml version="1.0"?>')
    xml_list.append('  <bioml label="x! taxon-to-file matching list">')
    xml_list.append('  <taxon label="%s">'%(dbname))
    xml_list.append('  <file format="peptide" URL="%s" />'%(fasta_pro))
    xml_list.append('  </taxon>')
    xml_list.append('</bioml>')

    return '\n'.join(xml_list)

def tandem_config_xml(param=None, mzxml=None, output=None, log='', seq='', taxonomy=None, dbname=None):
    xml_list = []
    xml_list.append('<?xml version="1.0" encoding="UTF-8"?>\n<bioml>')
    xml_list.append('<note type="input" label="list path, default parameters">%s</note>'%param)
    xml_list.append('<note type="input" label="spectrum, path">%s</note>'%mzxml)
#!/usr/bin/python 
import os
import sys
import stat
import massspec_toolbox_config as conf

path_xinteract = conf.get_TPP_path('xinteract')
path_prot_prophet = conf.get_TPP_path('ProteinProphet')

path_APEX_parser = conf.get_TPP2APEX_parser()
TPP_cutoff = 0.05

filename_script = 'run-inspect.xinteract-combined.sh';
f_script = open(filename_script,'w')
f_script.write('#!/bin/bash\n')
f_script.write('SAMPLE_NAME="tmp"\n')

for filename_pepxml in os.listdir('inspect'):
    filename_pepxml = filename_pepxml.strip()
    if( not filename_pepxml.endswith('.inspect.pepxml') ):
        continue
    
    filename_base = filename_pepxml.replace('.pepxml','')
    filename_pepxml = os.path.join('inspect',filename_pepxml)

    f_script.write('cp %s %s\n'%(filename_pepxml,'tmp/'))

filename_base = os.path.join('inspect.xinteract','$SAMPLE_NAME')
filename_xinteract = filename_base+'.xinteract.xml'
filename_prot = filename_base+'.xinteract.prot.xml'
filename_summary = filename_base+'.xinteract.summary'
#!/usr/bin/python
import os
import sys
import stat
import massspec_toolbox_config as conf

path_xinteract = conf.get_TPP_path('xinteract')
path_prot_prophet = conf.get_TPP_path('ProteinProphet')

path_APEX_parser = conf.get_TPP2APEX_parser()
TPP_cutoff = 0.05

filename_script = 'run-inspect.xinteract-combined.sh'
f_script = open(filename_script, 'w')
f_script.write('#!/bin/bash\n')
f_script.write('SAMPLE_NAME="tmp"\n')

for filename_pepxml in os.listdir('inspect'):
    filename_pepxml = filename_pepxml.strip()
    if (not filename_pepxml.endswith('.inspect.pepxml')):
        continue

    filename_base = filename_pepxml.replace('.pepxml', '')
    filename_pepxml = os.path.join('inspect', filename_pepxml)

    f_script.write('cp %s %s\n' % (filename_pepxml, 'tmp/'))

filename_base = os.path.join('inspect.xinteract', '$SAMPLE_NAME')
filename_xinteract = filename_base + '.xinteract.xml'
filename_prot = filename_base + '.xinteract.prot.xml'
filename_summary = filename_base + '.xinteract.summary'
Ejemplo n.º 4
0
#!/usr/bin/python
import os
import sys
import stat
import massspec_toolbox_config as conf

(db_name, filename_fasta) = conf.get_dbinfo()
current_dirname = os.getcwd()

tandem_bin = conf.get_TPP_path('tandem.exe')
tandem2xml_bin = conf.get_TPP_path('Tandem2XML')
filename_fasta_pro = filename_fasta + '.pro'

filename_param_abs = '/home/taejoon/massspec-toolbox/config/tandem-isb_input_kscore.xml'


def tandem_taxonomy_xml(dbname=None, fasta_pro=None):
    xml_list = []
    xml_list.append('<?xml version="1.0"?>')
    xml_list.append('  <bioml label="x! taxon-to-file matching list">')
    xml_list.append('  <taxon label="%s">' % (dbname))
    xml_list.append('  <file format="peptide" URL="%s" />' % (fasta_pro))
    xml_list.append('  </taxon>')
    xml_list.append('</bioml>')

    return '\n'.join(xml_list)


def tandem_config_xml(param=None,
                      mzxml=None,
                      output=None,
#!/usr/bin/python
import os
import sys
import stat
import massspec_toolbox_config as conf

path_xinteract = conf.get_TPP_path('xinteract')
path_APEX_parser = conf.get_TPP2APEX_parser()
TPP_cutoff = 0.05

filename_script = 'run-sequest.xinteract.sh'
f_script = open(filename_script, 'w')
f_script.write('#!/bin/bash\n')

for filename_pepxml in os.listdir('sequest.pepxml'):
    filename_pepxml = filename_pepxml.strip()
    if (not filename_pepxml.endswith('.sequest.pepxml')):
        continue
    filename_base = filename_pepxml.replace('.pepxml', '')
    filename_pepxml = os.path.join('sequest.pepxml', filename_pepxml)
    filename_base = os.path.join('sequest.xinteract', filename_base)
    filename_xinteract = filename_base + '.xinteract.xml'
    filename_prot = filename_base + '.xinteract.prot.xml'
    filename_summary = filename_base + '.xinteract.summary'
    f_script.write("%s -N%s -dxf_ -Op %s\n" %
                   (path_xinteract, filename_xinteract, filename_pepxml))
    f_script.write(
        "%s %s %.2f %s\n" %
        (path_APEX_parser, filename_prot, TPP_cutoff, filename_summary))
f_script.close()
os.chmod(filename_script, stat.S_IRWXU)
#!/usr/bin/python 
import os
import sys
import stat
import massspec_toolbox_config as conf

path_xinteract = conf.get_TPP_path('xinteract')
path_APEX_parser = conf.get_TPP2APEX_parser()
TPP_cutoff = 0.05

filename_script = 'run-sequest.xinteract.sh';
f_script = open(filename_script,'w')
f_script.write('#!/bin/bash\n')

for filename_pepxml in os.listdir('sequest.pepxml'):
    filename_pepxml = filename_pepxml.strip()
    if( not filename_pepxml.endswith('.sequest.pepxml') ):
        continue
    filename_base = filename_pepxml.replace('.pepxml','')
    filename_pepxml = os.path.join('sequest.pepxml',filename_pepxml)
    filename_base = os.path.join('sequest.xinteract',filename_base)
    filename_xinteract = filename_base+'.xinteract.xml'
    filename_prot = filename_base+'.xinteract.prot.xml'
    filename_summary = filename_base+'.xinteract.summary'
    f_script.write("%s -N%s -dxf_ -Op %s\n"%(path_xinteract,filename_xinteract,filename_pepxml))
    f_script.write("%s %s %.2f %s\n"%(path_APEX_parser,filename_prot,TPP_cutoff,filename_summary))
f_script.close()
os.chmod(filename_script,stat.S_IRWXU)