Skip to content

Commit

Permalink
added job options for all long tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Acribbs committed Apr 25, 2023
1 parent 2e3ecae commit 75acf3e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 deletions.
16 changes: 8 additions & 8 deletions tallytrin/pipeline_10x.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def correct_polyA(infile, outfile):

statement = '''python %(PYTHON_ROOT)s/complement_polyA_singlecell.py --infile=%(infile)s --outname=%(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@follows(mkdir("polyA_umi.dir"))
Expand All @@ -179,7 +179,7 @@ def identify_bcumi(infile, outfile):
statement = '''python %(PYTHON_ROOT)s/10x_identify_barcode.py --outfile=%(outfile)s --infile=%(infile)s --whitelist=polyA_umi.dir/%(name)s.whitelist.txt
--cmimode=%(cmimode)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')



Expand Down Expand Up @@ -226,7 +226,7 @@ def correct_reads(infile, outfile):

statement = '''python %(PYTHON_ROOT)s/correct_10xbarcode.py --infile=%(infile)s --outfile=%(outfile)s --cells=%(cells)s --whitelist=whitelist.txt --cmimode=%(cmimode)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@merge(correct_reads, "merge_corrected.fastq.gz")
Expand Down Expand Up @@ -266,7 +266,7 @@ def mapping(infile, outfile):

statement = '''minimap2 %(options)s %(cdna)s %(infile)s > %(outfile)s 2> %(outfile)s.log'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(mapping,
Expand All @@ -280,7 +280,7 @@ def run_samtools(infile, outfile):
samtools sort final.bam -o final_sorted.bam &&
samtools index final_sorted.bam'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(run_samtools,
Expand All @@ -296,7 +296,7 @@ def add_xt_tag(infile, outfile):
statement = '''python %(PYTHON_ROOT)s/xt_tag_nano.py --infile=%(infile)s --outfile=%(outfile)s &&
samtools index %(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(add_xt_tag,
Expand All @@ -309,7 +309,7 @@ def count(infile, outfile):

statement = '''umi_tools count --method unique --per-gene --gene-tag=XT --per-cell -I %(infile)s -S counts.tsv.gz'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@follows(mkdir("mtx.dir"))
Expand All @@ -325,7 +325,7 @@ def convert_tomtx(infile, outfile):

statement = '''python %(PYTHON_ROOT)s/save_mtx.py --data=%(infile)s --dir=mtx.dir/'''

P.run(statement, job_memory="250G")
P.run(statement, job_memory="100G", job_options='-t 24:00:00')


@follows(convert_tomtx)
Expand Down
32 changes: 16 additions & 16 deletions tallytrin/pipeline_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def polya_correct(infile, outfile):

statement = '''python %(PYTHON_ROOT)s/complement_polyA.py --infile=%(infile)s --outname=%(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')

@transform(polya_correct,
regex("processed_fastq.dir/(\S+)_polyA.fastq.gz"),
Expand All @@ -184,7 +184,7 @@ def polya_umi(infile, outfile):
else:
statement = '''python %(PYTHON_ROOT)s/polya_umi.py --infile=%(infile)s --outname=%(outfile)s --errors=%(error_removal)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(polya_umi,
Expand All @@ -210,7 +210,7 @@ def tso_umi(infile, outfile):
else:
statement = """cp %(infile)s %(outfile)s"""

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@follows(mkdir("mapped_files.dir"))
Expand All @@ -225,7 +225,7 @@ def mapping_trans(infile, outfile):

statement = '''minimap2 -ax map-ont -p 0.9 --end-bonus 10 -N 3 %(cdna_fasta)s %(infile)s > %(outfile)s 2> %(outfile)s.log'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(mapping_trans,
Expand All @@ -243,7 +243,7 @@ def samtools(infile, outfile):
samtools sort %(name)s_final.bam -o %(name)s_final_sorted.bam &&
samtools index %(name)s_final_sorted.bam '''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand All @@ -260,7 +260,7 @@ def xt_tag(infile, outfile):

statement = '''python %(PYTHON_ROOT)s/add_XT.py --infile=%(infile)s --outname=%(outfile)s && samtools index %(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand All @@ -273,7 +273,7 @@ def count_trans(infile, outfile):

statement = '''umi_tools count --per-gene --gene-tag=XT -I %(infile)s -S %(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand Down Expand Up @@ -308,7 +308,7 @@ def count_trans_unique(infile, outfile):

statement = '''umi_tools count --per-gene --method=unique --gene-tag=XT -I %(infile)s -S %(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand All @@ -326,7 +326,7 @@ def count_trans_noumis(infile, outfile):

statement = '''python %(PYTHON_ROOT)s/trans_count.py --infile=%(infile)s --outfile=%(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand Down Expand Up @@ -394,7 +394,7 @@ def mapping_gene(infile, outfile):
else:
statement = '''minimap2 -ax splice -k 14 --sam-hit-only --secondary=no --junc-bed %(junc_bed)s %(genome_fasta)s %(infile)s > %(outfile)s 2> %(outfile)s.log'''

P.run(statement, job_memory="60G")
P.run(statement, job_memory="60G", job_options='-t 24:00:00')


@transform(mapping_gene,
Expand All @@ -413,7 +413,7 @@ def samtools_sort(infile, outfile):
samtools sort %(name)s_gene.bam -o %(name)s_gene_sorted.bam &&
samtools index %(name)s_gene_sorted.bam'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(samtools_sort,
Expand All @@ -430,7 +430,7 @@ def featurecounts(infile, outfile):
samtools sort %(infile)s.featureCounts.bam -o %(name)s_featurecounts_gene_sorted.bam &&
samtools index %(name)s_featurecounts_gene_sorted.bam'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand All @@ -447,7 +447,7 @@ def count_gene(infile, outfile):

statement = '''umi_tools count --per-gene --gene-tag=XT -I %(infile)s -S %(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand Down Expand Up @@ -484,7 +484,7 @@ def count_gene_unique(infile, outfile):

statement = '''umi_tools count --per-gene --gene-tag=XT --method=unique -I %(infile)s -S %(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['correct'])
Expand Down Expand Up @@ -534,7 +534,7 @@ def count_trans_greedy(infile, outfile):
statement = '''python %(PYTHON_ROOT)s/greedy_bulk.py count -i %(infile)s
-t XT -o %(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


########
Expand All @@ -553,7 +553,7 @@ def count_trans_noumi(infile, outfile):

statement = '''python %(PYTHON_ROOT)s/trans_count.py --infile=%(infile)s --outfile=%(outfile)s'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@active_if(PARAMS['no_umi'])
Expand Down
4 changes: 2 additions & 2 deletions tallytrin/pipeline_illumina.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def map_hisat2(infile, outfile):

statement = """hisat2 -x %(hisat2_index)s -U %(infile)s -S %(outfile)s"""

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(map_hisat2,
Expand Down Expand Up @@ -180,7 +180,7 @@ def featurecounts(infile, outfile):
samtools sort %(infile)s.featureCounts.bam -o %(outfile)s &&
samtools index %(outfile)s"""

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@follows(mkdir("featurecounts.dir"))
Expand Down
14 changes: 7 additions & 7 deletions tallytrin/pipeline_singlecell_macosko.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def mapping(infile, outfile):

statement = '''minimap2 %(options)s %(cdna)s %(infile)s > %(outfile)s 2> %(outfile)s.log'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(mapping,
Expand All @@ -257,7 +257,7 @@ def run_samtools(infile, outfile):
samtools sort final.bam -o final_sorted.bam &&
samtools index final_sorted.bam'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(run_samtools,
Expand Down Expand Up @@ -338,7 +338,7 @@ def mapping_trimer(infile, outfile):

statement = '''minimap2 %(options)s %(cdna)s %(infile)s > %(outfile)s 2> %(outfile)s.log'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@follows(mkdir("collapse_reads.dir"))
Expand Down Expand Up @@ -388,7 +388,7 @@ def mapping_collapsed(infile, outfile):

statement = '''minimap2 %(options)s %(cdna)s %(infile)s > %(outfile)s 2> %(outfile)s.log'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')



Expand All @@ -402,7 +402,7 @@ def run_samtools_collapsed(infile, outfile):
samtools sort final_collapsed.bam -o final_sorted_collapsed.bam &&
samtools index final_sorted_collapsed.bam'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(run_samtools_collapsed,
Expand Down Expand Up @@ -505,7 +505,7 @@ def run_minimap2_trimer(infile, outfile):

statement = '''minimap2 %(options)s %(cdna)s %(infile)s > %(outfile)s 2> %(outfile)s.log'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(run_minimap2_trimer,
Expand All @@ -518,7 +518,7 @@ def run_samtools_trimer(infile, outfile):
samtools sort final_trimer.bam -o final_sorted_trimer.bam &&
samtools index final_sorted_trimer.bam'''

P.run(statement)
P.run(statement, job_options='-t 24:00:00')


@transform(run_samtools_trimer,
Expand Down

0 comments on commit 75acf3e

Please sign in to comment.