Skip to content

Commit

Permalink
adding threads
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaOb21 committed Feb 29, 2024
1 parent 6023076 commit a14cfb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions workflow/rules/purge_dups2.smk
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ rule purge_dups_alt:
hap_fa = "results/purge_dups_alt/hap.fa",
purged_fasta = "results/purge_dups_alt/hifiasm_a_purged.fa",
hist_plot = "results/purge_dups_alt/hist.out.png"
threads: config['minimap2']['t']
conda:
"../envs/purge_dups.yaml"
log:
"logs/purge_dups_alt.log"
shell:
"""
cat {input.fasta} {input.hap_fa_in} > merged.fa
minimap2 -xasm20 merged.fa {input.reads} -t {config[minimap2][t]} | gzip -c - > hifi_vs_hifiasm_contigs.paf.gz
minimap2 -xasm20 merged.fa {input.reads} -t {threads} | gzip -c - > hifi_vs_hifiasm_contigs.paf.gz
pbcstat hifi_vs_hifiasm_contigs.paf.gz
calcuts PB.stat > cutoffs 2>calcults.log
split_fa merged.fa > hifiasm.asm.split
minimap2 -xasm5 -DP hifiasm.asm.split hifiasm.asm.split -t {config[minimap2][t]} | gzip -c - > hifiasm.split.self.paf.gz
minimap2 -xasm5 -DP hifiasm.asm.split hifiasm.asm.split -t {threads} | gzip -c - > hifiasm.split.self.paf.gz
purge_dups -2 -T cutoffs -c PB.base.cov hifiasm.split.self.paf.gz > dups.bed 2> purge_dups.log
get_seqs -e dups.bed results/hifiasm/hifiasm.asm.a_ctg.fa > purged.fa
hist_plot.py -c cutoffs PB.stat hist.out.png
Expand Down

0 comments on commit a14cfb3

Please sign in to comment.