当前位置: 首页>>代码示例>>Python>>正文


Python Pipeline.run方法代码示例

本文整理汇总了Python中Pipeline.run方法的典型用法代码示例。如果您正苦于以下问题:Python Pipeline.run方法的具体用法?Python Pipeline.run怎么用?Python Pipeline.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pipeline的用法示例。


在下文中一共展示了Pipeline.run方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: downloadSCOP

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def downloadSCOP( infile, outfile ):
    '''download the latest scop sequence set (< 40% identical)'''
    
    statement = '''
    wget -O %(outfile)s "http://astral.berkeley.edu/seq.cgi?get=scopdom-seqres-gd-sel-gs-bib;ver=1.75;item=seqs;cut=40"
    '''
    
    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:10,代码来源:pairsdb.py

示例2: buildAlignmentCoordinates

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def buildAlignmentCoordinates(infile, outfile):
    '''
    build coordinates file from alignment delta
    file
    '''
    to_cluster = True
    statement = '''show-coords -T -r %(infile)s > %(outfile)s'''
    P.run()
开发者ID:BioinformaticsArchive,项目名称:cgat,代码行数:10,代码来源:pipeline_metagenomebenchmark.py

示例3: filterAlignments

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def filterAlignments(infile, outfile):
    '''
    filter alignments to retain only those that
    have > 99% identity to the reference
    '''
    to_cluster = True
    statement = '''delta-filter -q -i 99 %(infile)s > %(outfile)s'''
    P.run()
开发者ID:BioinformaticsArchive,项目名称:cgat,代码行数:10,代码来源:pipeline_metagenomebenchmark.py

示例4: splitFasta

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def splitFasta( infiles, outfiles):
    '''split fasta file.'''
    
    infile = infiles[0]
    chunk_size = 500
    statement = '''
    cat %(infile)s
    | perl /ifs/devel/andreas/cgat/split_fasta.pl 
       -a blast.dir/chunk_%%s.fasta
       %(chunk_size)i 
    > split.log
    '''
    
    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:16,代码来源:pairsdb.py

示例5: buildMask

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def buildMask( infile, outfile ):
    '''build seg mask for protein sequences.'''

    to_cluster = True

    statement = '''
    segmasker -in %(infile)s
              -infmt fasta 
              -parse_seqids 
              -outfmt maskinfo_asn1_bin 
              -out %(outfile)s
    >& %(outfile)s.log
    '''
    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:16,代码来源:pairsdb.py

示例6: createAlignmentBedFiles

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def createAlignmentBedFiles(infile, outfile):
    '''
    create bed files - the intervals are with respect to the 
    reference genome
    intervals are merged to form a non redundant alignment set
    '''
    # has to be output from show coords in tab format
    # also have to be sorted for mergeBed
    to_cluster = True
    statement = '''cat %(infile)s
                   | python %(scriptsdir)s/nucmer2bed.py -t bed4 --log=%(outfile)s.log 
                   | mergeBed -i - 
                   | gzip > %(outfile)s'''
    P.run()
开发者ID:BioinformaticsArchive,项目名称:cgat,代码行数:16,代码来源:pipeline_metagenomebenchmark.py

示例7: alignContigsToReference

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def alignContigsToReference(outfile, param1, param2):
    '''
    align the contigs to the reference genomes
    using nucmer
    '''
    to_cluster = True

    reffile, contigfile = param1, param2
    pattern = P.snip(os.path.basename(outfile), ".delta")
    statement = '''nucmer -p %(pattern)s %(reffile)s %(contigfile)s'''
    P.run()
    outf = os.path.basename(outfile)
    statement = '''mv %(outf)s alignment.dir'''
    P.run()
开发者ID:BioinformaticsArchive,项目名称:cgat,代码行数:16,代码来源:pipeline_metagenomebenchmark.py

示例8: downloadPFAM

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def downloadPFAM( infile, outfiles ):
    '''download the latest PFAM domain sequence set'''
    
    outfile1, outfile2 = outfiles
    statement = '''
    wget -O %(outfile1)s "ftp://ftp.sanger.ac.uk/pub/databases/Pfam/current_release/Pfam-A.fasta.gz";
    '''

    P.run()

    statement = '''
    wget -O %(outfile2)s "ftp://ftp.sanger.ac.uk/pub/databases/Pfam/current_release/Pfam-A.seed.gz";
    '''

    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:17,代码来源:pairsdb.py

示例9: prepareDatabase

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def prepareDatabase( infiles, outfile ):
    '''prepare the blast database.'''

    fastafile, maskfile = infiles
    to_cluster = True
    statement = '''
    makeblastdb 
            -in %(fastafile)s
            -dbtype prot 
            -parse_seqids
            -mask_data %(maskfile)s
            -out nrdb50
            -title "Uniref Protein Database"
    >& %(outfile)s
    '''
    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:18,代码来源:pairsdb.py

示例10: mergeBlast

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def mergeBlast( infiles, outfile ):
    '''merge blast results into a single file.'''

    to_cluster = True

    files = [ (int(re.match( ".*chunk_(\d+).blast.gz", x).groups()[0]), x) for x in infiles ]
    files.sort()

    files = " ".join( [ x[1] for x in files ] )

    statement = '''zcat %(files)s | awk '$1 == "query_nid" { if(a){ next;} a=1; } {print}' | gzip > %(outfile)s'''
    P.run()

    files = [ (int(re.match( ".*chunk_(\d+).blast.gz.log", x).groups()[0]), x) for x in infiles ]
    files.sort()

    files = " ".join( [ x[1] for x in files ] )

    statement = '''cat %(files)s  >> %(outfile)s.log'''
    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:22,代码来源:pairsdb.py

示例11: mapSCOP

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def mapSCOP( infile, outfile ):
    '''map scop against sequence database.
    '''

    to_cluster = True
    max_evalue = 0.00001
    num_results = 100
    mask = 21
    # upper case is critical, otherwise traceback fails!?
    matrix = "BLOSUM50"
    gop = 12
    gep = 2
    dbname = "/tmp/blast/nrdb50"
    num_jobs = 8
    
    job_options = '-pe dedicated %i -R y' % num_jobs

    statement = '''
    /ifs/devel/andreas/cgat/run.py --log=%(outfile)s.log
    'blastp
       -query %(infile)s
       -db %(dbname)s
       -evalue %(max_evalue)f
       -num_alignments %(num_results)i
       -num_descriptions %(num_results)i
       -db_soft_mask %(mask)i
       -matrix %(matrix)s
       -gapopen %(gop)i
       -gapextend %(gep)i
       -num_threads %(num_jobs)i
       -outfmt "6 qseqid qstart qend sseqid sstart send evalue bitscore pident score qseq sseq"
    | python /ifs/devel/andreas/cgat/blast2table.py 
        --alignment-format=blocks
    | gzip
    > %(outfile)s';
    checkpoint;
    echo "#//" | gzip >> %(outfile)s
    '''

    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:42,代码来源:pairsdb.py

示例12: runBlast

# 需要导入模块: import Pipeline [as 别名]
# 或者: from Pipeline import run [as 别名]
def runBlast( infile, outfile ):
    '''run blast
    '''
    
    to_cluster = True
    max_evalue = 1.0
    num_results = 1000000
    mask = 21
    dbsize = 1500000000
    # upper case is critical, otherwise traceback fails!?
    matrix = "BLOSUM50"
    gop = 12
    gep = 2
    dbname = "/tmp/blast/nrdb50"

    statement = '''
    /ifs/devel/andreas/cgat/run.py --log=%(outfile)s.log
    'blastp
       -query %(infile)s
       -db %(dbname)s
       -evalue %(max_evalue)f
       -num_alignments %(num_results)i
       -num_descriptions %(num_results)i
       -db_soft_mask %(mask)i
       -matrix %(matrix)s
       -gapopen %(gop)i
       -gapextend %(gep)i
       -outfmt "6 qseqid qstart qend sseqid sstart send evalue bitscore pident score qseq sseq"
    | python /ifs/devel/andreas/cgat/blast2table.py 
        --alignment-format=blocks
    | gzip
    > %(outfile)s';
    checkpoint;
    echo "#//" | gzip >> %(outfile)s
    '''

    P.run()
开发者ID:AndreasHeger,项目名称:adda,代码行数:39,代码来源:pairsdb.py


注:本文中的Pipeline.run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。