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


Python Launch.pipeline_specific_vars方法代码示例

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


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

示例1: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self,args,verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        psv = Launch.pipeline_specific_vars(self,args)
        
        # Could be multiple annotations supported per genome
        psv['annotation'] = args.annotation
        if psv['genome'] != self.GENOME_DEFAULT and psv['annotation'] == self.ANNO_DEFAULT:
            psv['annotation'] = self.ANNO_DEFAULTS[psv['genome']]
        if psv['annotation'] not in self.ANNO_ALLOWED[psv['genome']]:
            print psv['genome']+" has no "+psv['annotation']+" annotation."
            sys.exit(1)
        
        # Some specific settings
        psv['nthreads']   = 8
        psv['rnd_seed']   = 12345

        # If annotation is not default, then add it to title
        if psv['annotation'] != self.ANNO_DEFAULTS[psv['genome']]:
            psv['title'] += ', ' + psv['annotation']
            psv['name']  += '_' + psv['annotation']
            
        self.no_tophat = args.no_tophat
        if not self.no_tophat:
            self.PRUNE_STEPS = []

        # Must override results location because of annotation
        psv['resultsLoc'] = dxencode.umbrella_folder(args.folder,self.FOLDER_DEFAULT,self.proj_name,psv['exp_type'], \
                                                                                            psv['genome'],psv['annotation'])
        psv['resultsFolder'] = psv['resultsLoc'] + psv['experiment'] + '/'
        self.update_rep_result_folders(psv)

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv,indent=4)
        return psv
开发者ID:BioNinja,项目名称:long-rna-seq-pipeline,代码行数:37,代码来源:lrnaLaunch.py

示例2: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
 def pipeline_specific_vars(self,args,verbose=False):
     '''Adds pipeline specific variables to a dict, for use building the workflow.'''
     psv = Launch.pipeline_specific_vars(self,args)
     
     # Some specific settings
     psv['nthreads']    = 8
     psv['map_thresh']  = 10
     psv['sample_size'] = 15000000
     psv['read_length'] = args.read_length
     psv['pe_or_se'] = "pe"
     for ltr in sorted( psv['reps'].keys() ):
         rep = psv['reps'][ltr]
         if not rep['paired_end']:
             psv['pe_or_se'] = "se"
         if rep['paired_end'] and 'barcode' in rep and rep['barcode'] == "undetected":
             del rep['barcode']
     if args.umi:
         psv['umi'] = "yes"
     psv['upper_limit'] = 0
     # Crawford fastqs require trimming
     psv["trim_len"] = 0
     if not self.template and not psv['paired_end'] and "crawford" in psv['lab']:
         print "Detected that fastqs will be trimmed to 20"
         psv["trim_len"] = 20
     self.multi_rep = True      # For DNase, a single tech_rep moves on to merge/filter.
     self.combined_reps = True
     
     if verbose:
         print "Pipeline Specific Vars:"
         print json.dumps(psv,indent=4)
     return psv
开发者ID:ENCODE-DCC,项目名称:dnase_pipeline,代码行数:33,代码来源:dnaseLaunch.py

示例3: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self,args,verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        psv = Launch.pipeline_specific_vars(self,args)
        
        # Could be multiple annotations supported per genome
        psv['annotation'] = args.annotation
        if psv['genome'] != self.GENOME_DEFAULT and psv['annotation'] == self.ANNO_DEFAULT:
            psv['annotation'] = self.ANNO_DEFAULTS[psv['genome']]
        if psv['annotation'] not in self.ANNO_ALLOWED[psv['genome']]:
            print psv['genome']+" has no "+psv['annotation']+" annotation."
            sys.exit(1)

        if not psv['paired_end']:
            print "Rampage is always expected to be paired-end but mapping says otherwise."
            sys.exit(1)

        # Some specific settings
        psv['nthreads']   = 8
        psv['control'] = args.control
        
        # run will either be for combined or single rep.
        if not psv['combined']:
            run = psv['reps']['a']  # If not combined then run will be for the first (only) replicate
        else:
            run = psv
            
        # workflow labeling
        psv['description'] = "The ENCODE Rampage RNA pipeline for long RNAs"
        run['name'] = "rampage_"+psv['genome']
        if psv['genome'] == 'mm10':
            run['name'] += psv['annotation']
        if psv['gender'] == 'female':
            run['name'] += "XX"
        else:
            run['name'] += "XY"
        run['title'] = "Rampage RNA " + psv['experiment'] + " - " + run['rep_tech']
        run['name'] += "_"+psv['experiment']+"_" + run['rep_tech']
        if not psv['combined']:
            run['title'] += " [library '"+run['library_id']+"']"
        run['title'] += " on " + psv['genome']+" - "+psv['gender']

        # Must override results location because of annotation
        psv['resultsLoc'] = dxencode.umbrella_folder(args.folder,self.FOLDER_DEFAULT,self.proj_name,psv['exp_type'], \
                                                                                            psv['genome'],psv['annotation'])
        psv['resultsFolder'] = psv['resultsLoc'] + psv['experiment'] + '/'
        psv['reps']['a']['resultsFolder'] = psv['resultsLoc'] + psv['experiment'] + '/' + \
                                                              psv['reps']['a']['rep_tech'] + '/'
        if psv['combined']:
            psv['reps']['b']['resultsFolder'] = psv['resultsLoc'] + psv['experiment'] + '/' + \
                                                                  psv['reps']['b']['rep_tech'] + '/'

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv,indent=4)
        return psv
开发者ID:devnull86,项目名称:long-rna-seq-pipeline,代码行数:57,代码来源:rampageLaunch.py

示例4: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self,args,verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        #args.pe = True # This is necessary to ensure templating does what it must.
        psv = Launch.pipeline_specific_vars(self,args)
        
        # Could be multiple annotations supported per genome
        psv['annotation'] = args.annotation
        if psv['genome'] != self.GENOME_DEFAULT and psv['annotation'] == self.ANNO_DEFAULT:
            psv['annotation'] = self.ANNO_DEFAULTS[psv['genome']]
        if psv['annotation'] not in self.ANNO_ALLOWED[psv['genome']]:
            print psv['genome']+" has no "+psv['annotation']+" annotation."
            sys.exit(1)

        # Some specific settings
        psv['assay_type'] = "rampage"
        if self.exp["assay_term_name"] == "CAGE":
            psv['assay_type'] = "cage"
        psv['nthreads']   = 8
        if not self.template:
            psv['control'] = args.control
        
        if psv['paired_end'] and psv['assay_type'] == "cage":
            print "ERROR: CAGE is always expected to be single-end but mapping says otherwise."
            sys.exit(1)
        elif not psv['paired_end'] and psv['assay_type'] == "rampage":
            print "Rampage is always expected to be paired-end but mapping says otherwise."
            sys.exit(1)

        # run will either be for combined or single rep.
        if not self.combined_reps:
            run = psv['reps']['a']  # If not combined then run will be for the first (only) replicate
        else:
            run = psv
            
        # If annotation is not default, then add it to title
        if psv['annotation'] != self.ANNO_DEFAULTS[psv['genome']]:
            psv['title'] += ', ' + psv['annotation']
            psv['name']  += '_' + psv['annotation']

        if self.exp["assay_term_name"] == "CAGE":
            psv['name'] = psv['assay_type'] + psv['name'][4:]
            psv['title'] = "CAGE" + psv['title'][7:]

        # Must override results location because of annotation
        psv['resultsLoc'] = self.umbrella_folder(args.folder,self.FOLDER_DEFAULT,self.proj_name,psv['exp_type'], \
                                                                                        psv['genome'],psv['annotation'])
        psv['resultsFolder'] = psv['resultsLoc']
        if not self.template:
            psv['resultsFolder'] += psv['experiment'] + '/'
        self.update_rep_result_folders(psv)

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv,indent=4)
        return psv
开发者ID:ENCODE-DCC,项目名称:long-rna-seq-pipeline,代码行数:57,代码来源:rampageLaunch.py

示例5: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self,args,verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        psv = Launch.pipeline_specific_vars(self,args)

        # Now add pipline specific variables and tests
        
        # Could be multiple annotations supported per genome
        psv['annotation'] = args.annotation
        if psv['genome'] != self.GENOME_DEFAULT and psv['annotation'] == self.ANNO_DEFAULT:
            psv['annotation'] = self.ANNO_DEFAULTS[psv['genome']]
        if psv['annotation'] not in self.ANNO_ALLOWED[psv['genome']]:
            print psv['genome']+" has no "+psv['annotation']+" annotation."
            sys.exit(1)
        
        # Paired ends?
        if psv['paired_end']:
            print "Small-RNA is always expected to be single-end but mapping says otherwise."
            #print json.dumps(psv,indent=4,sort_keys=True)
            sys.exit(1)

        # Some specific settings
        psv['nthreads']   = 8

        # By replicate:
        for ltr in psv['reps'].keys():
            if len(ltr) != 1: # only simple reps
                continue
            rep = psv['reps'][ltr]
            rep["clipping_model"] = "ENCODE3" # Default
            if "a_tailing" in rep:
                rep["clipping_model"] = "A_Tailing_" + rep["a_tailing"]
                print "%s detected for %s" % (rep["clipping_model"],rep["rep_tech"])

        # If annotation is not default, then add it to title
        if psv['annotation'] != self.ANNO_DEFAULTS[psv['genome']]:
            psv['title'] += ', ' + psv['annotation']
            psv['name']  += '_' + psv['annotation']

        # Must override results location because of annotation
        genome = psv['genome']
        if self.no_refs: # (no_refs is only True when templating)
            genome = None # If templating with no refs then this will hide genome and annotation
        psv['resultsLoc'] = self.umbrella_folder(args.folder,self.FOLDER_DEFAULT,self.proj_name,psv['exp_type'], \
                                                                                        psv['genome'],psv['annotation'])
        psv['resultsFolder'] = psv['resultsLoc']
        if not self.template:
            psv['resultsFolder'] += psv['experiment'] + '/'
        self.update_rep_result_folders(psv)

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv,indent=4)
        return psv
开发者ID:ENCODE-DCC,项目名称:long-rna-seq-pipeline,代码行数:55,代码来源:srnaLaunch.py

示例6: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
 def pipeline_specific_vars(self,args,verbose=False):
     '''Adds pipeline specific variables to a dict, for use building the workflow.'''
     psv = Launch.pipeline_specific_vars(self,args)
     
     # Some specific settings
     psv['nthreads']    = 8
     psv['min_insert']  = 0
     psv['max_insert']  = 500
     
     if verbose:
         print "Pipeline Specific Vars:"
         print json.dumps(psv,indent=4)
     return psv
开发者ID:mlin,项目名称:dna-me-pipeline,代码行数:15,代码来源:dmeLaunch.py

示例7: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self, args, verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        psv = Launch.pipeline_specific_vars(self, args)

        # Could be multiple annotations supported per genome
        psv['annotation'] = args.annotation
        if psv['genome'] != self.GENOME_DEFAULT and psv['annotation'] == self.ANNO_DEFAULT:
            psv['annotation'] = self.ANNO_DEFAULTS[psv['genome']]
        if psv['annotation'] not in self.ANNO_ALLOWED[psv['genome']]:
            print psv['genome']+" has no "+psv['annotation']+" annotation."
            sys.exit(1)

        # Some specific settings
        psv['nthreads'] = 8
        psv['rnd_seed'] = 12345

        # If paired-end then read_strand might vary TruSeq or ScriptSeq, but only for quant-rsem
        psv["read_strand"] = "unstranded"  # SE experiments are all unstranded
        if psv["paired_end"]:
            psv["read_strand"] = "reverse"  # Usual ENCODE LRNA experiments are rd1-/rd2+ (AKA reverse)
            if not psv["stranded"]:
                psv["read_strand"] = "unstranded"  # "ScriptSeq" experiments are rd1+/rd2- (AKA forward)
                print "Detected unstranded library"
            elif psv.get('ScriptSeq', False):  # file.replicate.library.document contains "/documents/F17c31e10-1542-42c6-8b4c-3afff95564cf%2F"
                psv["read_strand"] = "ScriptSeq"  # "ScriptSeq" experiments are rd1+/rd2- (AKA forward)
                print "Detected ScriptSeq"
        # print "Detected special cases"

        # If annotation is not default, then add it to title
        if psv['annotation'] != self.ANNO_DEFAULTS[psv['genome']]:
            psv['title'] += ', ' + psv['annotation']
            psv['name'] += '_' + psv['annotation']

        self.no_tophat = True
        if args.tophat_also:
            self.no_tophat = False
            self.PRUNE_STEPS = []  # This blocks pruning... keeping tophat

        # Must override results location because of annotation
        psv['resultsLoc'] = self.umbrella_folder(args.folder, self.FOLDER_DEFAULT, self.proj_name,
                                                 psv['exp_type'], psv['genome'], psv['annotation'])
        psv['resultsFolder'] = psv['resultsLoc']
        if not self.template:
            psv['resultsFolder'] += psv['experiment'] + '/'
        self.update_rep_result_folders(psv)

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv, indent=4)
        return psv
开发者ID:ENCODE-DCC,项目名称:long-rna-seq-pipeline,代码行数:52,代码来源:lrnaLaunch.py

示例8: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self, args, verbose=False):
        """Adds pipeline specific variables to a dict, for use building the workflow."""
        psv = Launch.pipeline_specific_vars(self, args)

        # Now add pipline specific variables and tests

        # Could be multiple annotations supported per genome
        psv["annotation"] = args.annotation
        if psv["genome"] != self.GENOME_DEFAULT and psv["annotation"] == self.ANNO_DEFAULT:
            psv["annotation"] = self.ANNO_DEFAULTS[psv["genome"]]
        if psv["annotation"] not in self.ANNO_ALLOWED[psv["genome"]]:
            print psv["genome"] + " has no " + psv["annotation"] + " annotation."
            sys.exit(1)

        # Paired ends?
        if psv["paired_end"]:
            print "Small-RNA is always expected to be single-end but mapping says otherwise."
            # print json.dumps(psv,indent=4,sort_keys=True)
            sys.exit(1)

        # Some specific settings
        psv["nthreads"] = 8

        # If annotation is not default, then add it to title
        if psv["annotation"] != self.ANNO_DEFAULTS[psv["genome"]]:
            psv["title"] += ", " + psv["annotation"]
            psv["name"] += "_" + psv["annotation"]

        # Must override results location because of annotation
        genome = psv["genome"]
        if self.no_refs:  # (no_refs is only True when templating)
            genome = None  # If templating with no refs then this will hide genome and annotation
        psv["resultsLoc"] = self.umbrella_folder(
            args.folder, self.FOLDER_DEFAULT, self.proj_name, psv["exp_type"], psv["genome"], psv["annotation"]
        )
        psv["resultsFolder"] = psv["resultsLoc"]
        if not self.template:
            psv["resultsFolder"] += psv["experiment"] + "/"
        self.update_rep_result_folders(psv)

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv, indent=4)
        return psv
开发者ID:Kisun,项目名称:long-rna-seq-pipeline,代码行数:46,代码来源:srnaLaunch.py

示例9: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self,args,verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        psv = Launch.pipeline_specific_vars(self,args)

        # Now add pipline specific variables and tests
        
        # Could be multiple annotations supported per genome
        psv['annotation'] = args.annotation
        if psv['genome'] != self.GENOME_DEFAULT and psv['annotation'] == self.ANNO_DEFAULT:
            psv['annotation'] = self.ANNO_DEFAULTS[psv['genome']]
        if psv['annotation'] not in self.ANNO_ALLOWED[psv['genome']]:
            print psv['genome']+" has no "+psv['annotation']+" annotation."
            sys.exit(1)
        
        # Paired ends?
        if psv['paired_end']:
            print "Small-RNA is always expected to be single-end but mapping says otherwise."
            #print json.dumps(psv,indent=4,sort_keys=True)
            sys.exit(1)

        # Some specific settings
        psv['nthreads']   = 8

        # If annotation is not default, then add it to title
        if psv['annotation'] != self.ANNO_DEFAULTS[psv['genome']]:
            psv['title'] += ', ' + psv['annotation']
            psv['name']  += '_' + psv['annotation']

        # Must override results location because of annotation
        psv['resultsLoc'] = dxencode.umbrella_folder(args.folder,self.FOLDER_DEFAULT,self.proj_name,psv['exp_type'], \
                                                                                            psv['genome'],psv['annotation'])
        psv['resultsFolder'] = psv['resultsLoc'] + psv['experiment'] + '/'
        self.update_rep_result_folders(psv)

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv,indent=4)
        return psv
开发者ID:BioNinja,项目名称:long-rna-seq-pipeline,代码行数:40,代码来源:srnaLaunch.py

示例10: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self,args,verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        psv = Launch.pipeline_specific_vars(self,args)

        # Now add pipline specific variables and tests
        
        # Paired ends?
        if psv['paired_end']:
            print "Small-RNA is always expected to be single-end but mapping says otherwise."
            sys.exit(1)

        # Some specific settings
        psv['nthreads']   = 8

        # run will either be for combined or single rep.
        if not psv['combined']:
            run = psv['reps']['a']  # If not combined then run will be for the first (only) replicate
        else:
            run = psv
            print "Small-RNA-seq pipeline currently does not support combined-replicate processing."
            sys.exit(1)
            
        # workflow labeling
        psv['description'] = "The ENCODE RNA Seq pipeline for short RNA"
        genderToken = "XY"
        if psv['gender'] == 'female':
            genderToken = "XX"
        run['title'] = "short RNA-seq " + psv['experiment'] + " - "+run['rep_tech'] + \
                           " (library '"+run['library_id']+"') on " + psv['genome'] + \
                            " - "+psv['gender']
        run['name'] = "srna_"+psv['genome']+genderToken+"_"+psv['experiment'] + "_"+run['rep_tech']

        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv,indent=4)
        return psv
开发者ID:devnull86,项目名称:long-rna-seq-pipeline,代码行数:38,代码来源:srnaLaunch.py

示例11: pipeline_specific_vars

# 需要导入模块: from launch import Launch [as 别名]
# 或者: from launch.Launch import pipeline_specific_vars [as 别名]
    def pipeline_specific_vars(self,args,verbose=False):
        '''Adds pipeline specific variables to a dict, for use building the workflow.'''
        psv = Launch.pipeline_specific_vars(self,args)

        # Now add pipline specific variables and tests
        
        # Paired ends?
        if psv['paired_end']:
            print "Small-RNA is always expected to be single-end but mapping says otherwise."
            #print json.dumps(psv,indent=4,sort_keys=True)
            sys.exit(1)

        # Some specific settings
        psv['nthreads']   = 8

        # run will either be for combined or single rep.
        if self.combined_reps:
            print "Small-RNA-seq pipeline currently does not support combined-replicate processing."
            sys.exit(1)
           
        if verbose:
            print "Pipeline Specific Vars:"
            print json.dumps(psv,indent=4)
        return psv
开发者ID:ZhenyuZ,项目名称:long-rna-seq-pipeline,代码行数:26,代码来源:srnaLaunch.py


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