def countTaggedReads(infiles, outfile): '''count number of reads in input files.''' to_cluster = True read1, read2 = infiles m = PipelineMapping.Counter() statement = m.build((read1, ), outfile) P.run()
def mapReadsWithTophatFusion(infiles, outfile): '''map reads from .fastq or .sra files and find candidate fusions A list with known splice junctions expect from rnaseq pipeline ''' job_threads = PARAMS["tophat_threads"] if "--butterfly-search" in PARAMS["tophat_options"]: # for butterfly search - require insane amount of # RAM. job_options += " -l mem_free=50G" to_cluster = USECLUSTER m = PipelineMapping.TopHat_fusion() infile = infiles # if a file of reference junctions, as generated by the rnaseq pipline, # has been specified in the ini, then pass this to tophat-fusion if not PARAMS['tophatfusion_reference_junctions'] is None: reffile = PARAMS['tophatfusion_reference_junctions'] tophat_options = PARAMS["tophat_options"] + \ " --raw-juncs %(reffile)s" % locals() tophatfusion_options = PARAMS["tophatfusion_options"] statement = m.build((infile, ), outfile) P.run()
def buildBAM(infile, outfile): '''map reads with bowtie''' track = P.snip(os.path.basename(outfile), ".bam") job_threads = PARAMS["bowtie_threads"] m = PipelineMapping.Bowtie() reffile = PARAMS["samtools_genome"] statement = m.build((infile,), outfile) P.run()
def alignReadsToTranscriptome(infile, outfile): '''map reads to transcriptome with bowtie''' track = P.snip(os.path.basename(outfile), ".bam") job_threads = PARAMS["bowtie_threads"] m = PipelineMapping.Bowtie() reffile = PARAMS["bowtie_transcriptome"] bowtie_options = PARAMS["bowtie_options"] statement = m.build((infile, ), outfile) P.run()
def buildBAM(infile, outfile, options): '''map reads with bowtie''' job_threads = PARAMS["bowtie_threads"] m = PipelineMapping.Bowtie() reffile = PARAMS["samtools_genome"] bowtie_options = options statement = m.build((infile, ), outfile) # print(statement) P.run()
def mapReadsWithBismark(infile, outfile): '''map reads with bismark''' # can this handle paired end? # it appears bismark uses twice as many CPUs as expeceted! job_options = "-l mem_free=%s " % PARAMS["bismark_memory"] job_threads = (PARAMS["bismark_threads"] * 2) + 1 outdir = "bismark.dir" bismark_options = PARAMS["bismark_options"] m = PipelineMapping.Bismark() statement = m.build((infile, ), outfile) # print statement P.run()
def mapReads(infiles, outfile): '''Map reads to the genome using BWA ''' job_threads = PARAMS["bwa_threads"] m = PipelineMapping.BWA() statement = m.build((infiles, ), outfile) P.run()
def countReads(infile, outfile): '''count number of reads in input files.''' to_cluster = True m = PipelineMapping.Counter() statement = m.build((infile, ), outfile) P.run()