From 616434d670f0c49ef687d8ca61b33d627ffa0229 Mon Sep 17 00:00:00 2001 From: Pontus Hojer Date: Wed, 4 Dec 2019 11:19:05 +0100 Subject: [PATCH] Changes from PR review. Remove awk part from sort command and other minor changes. --- environment.yml | 1 - src/blr/Snakefile | 8 +++----- src/blr/blr.yaml | 2 +- src/blr/rules/trim.smk | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/environment.yml b/environment.yml index 83dd92a..1050aeb 100644 --- a/environment.yml +++ b/environment.yml @@ -24,4 +24,3 @@ dependencies: - freebayes - ruamel.yaml - ema=0.6.2 - diff --git a/src/blr/Snakefile b/src/blr/Snakefile index bf8fee0..aabcc48 100644 --- a/src/blr/Snakefile +++ b/src/blr/Snakefile @@ -40,13 +40,11 @@ rule barcode_sort_fastq: input: fastq = "trimmed.barcoded.{nr}.fastq.gz" shell: - "pigz -cd {input.fastq} |" + "pigz -cd -p 1 {input.fastq} |" " paste - - - - |" - " awk -F ' ' '{{print $2,$0}}' |" - " sort -t ' ' -k1,1 |" - " cut -d' ' -f 2- |" + " sort -t ' ' -k2 |" " tr '\t' '\n' |" - " gzip > {output.fastq}" + " pigz > {output.fastq}" rule map_reads: diff --git a/src/blr/blr.yaml b/src/blr/blr.yaml index c494aa7..8b5a478 100644 --- a/src/blr/blr.yaml +++ b/src/blr/blr.yaml @@ -3,7 +3,7 @@ molecule_tag: MI # Used to store molecule ID, same as 10x default. num_mol_tag: MN # Used to store number of molecules per barcode sequence_tag: RX # Used to store original barcode sequence in bam file. 'RX' is 10x genomic default genome_reference: # Path to indexed reference -read_mapper: bowtie2 # Choose bwa, bowtie2, minimap2 and ema +read_mapper: bowtie2 # Choose bwa, bowtie2, minimap2 or ema duplicate_marker: sambamba # Choose sambamba or samblaster barcode_max_dist: 2 # Max edit distance (Leveshtein distance) allowed to cluster two barcode sequences together max_molecules_per_bc: 260 # Max number of molecules allowed for a single barcode (removes if bc has > 260 molecules). diff --git a/src/blr/rules/trim.smk b/src/blr/rules/trim.smk index 44eb1f1..b48d663 100644 --- a/src/blr/rules/trim.smk +++ b/src/blr/rules/trim.smk @@ -76,7 +76,7 @@ rule extract_DBS: " -j {threads}" " -m 19" " -M 21" - " --max-n 0" + " --max-n 0" " -o {output.fastq}" " {input.fastq}" " > {log}"