Skip to content

Commit

Permalink
added less stringend barcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
replikation committed Oct 29, 2020
1 parent 49d5759 commit 276db92
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions modules/filter_fastq_by_length.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ process filter_fastq_by_length {
awk -F"\\t" 'length(\$2) <= 1500' | sed 's/\\t/\\n/g' | gzip > "${name}_filtered.fastq.gz"
;;
*.fastq)
cat ${reads} | paste - - - - | awk -F"\\t" 'length(\$2) >= 1000' | sed 's/\\t/\\n/g' |\
awk -F"\\t" 'length(\$2) <= 1300' | sed 's/\\t/\\n/g' | gzip > "${name}_filtered.fastq.gz"
cat ${reads} | paste - - - - | awk -F"\\t" 'length(\$2) >= 250' | sed 's/\\t/\\n/g' |\
awk -F"\\t" 'length(\$2) <= 1500' | sed 's/\\t/\\n/g' | gzip > "${name}_filtered.fastq.gz"
;;
esac
Expand Down
13 changes: 12 additions & 1 deletion modules/guppy.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process guppy_gpu {
mkdir -p fastq_tmp/
cp fastq/*.txt fastq_tmp
"""
else if (!params.single)
if (!params.single && !params.one_end)
"""
guppy_basecaller -c dna_r9.4.1_450bps_hac.cfg -i ${dir} -s fastq_tmp -x auto -r
guppy_barcoder --require_barcodes_both_ends -i fastq_tmp -s fastq --arrangements_files "barcode_arrs_nb12.cfg barcode_arrs_nb24.cfg"
Expand All @@ -29,6 +29,17 @@ process guppy_gpu {
find -L \${barcodes} -name '*.fastq' -exec cat {} + | gzip > \${barcodes##*/}.fastq.gz
done
cp fastq/*.txt fastq_tmp
"""
else if (!params.single && params.one_end)
"""
guppy_basecaller -c dna_r9.4.1_450bps_hac.cfg -i ${dir} -s fastq_tmp -x auto -r
guppy_barcoder -i fastq_tmp -s fastq --arrangements_files "barcode_arrs_nb12.cfg barcode_arrs_nb24.cfg"
for barcodes in fastq/barcode??; do
find -L \${barcodes} -name '*.fastq' -exec cat {} + | gzip > \${barcodes##*/}.fastq.gz
done
cp fastq/*.txt fastq_tmp
"""
}
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ params {
localguppy = false
buildDB = false
cloudProcess = false
one_end = false

// parameters
primerV = 'V3'
Expand Down
9 changes: 5 additions & 4 deletions poreCov.nf
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ def helpMSG() {
${c_yellow}Parameters - Basecalling${c_reset}
--localguppy use a native guppy installation instead of a gpu-guppy-docker
native guppy installation is used by default for singularity or conda
--one_end removes the recommended "--require_barcodes_both_ends" from guppy demultiplexing
try this if to many barcodes are unclassified (check the pycoQC report)
${c_yellow}Parameters - nCov genome reconstruction${c_reset}
--primerV artic-ncov2019 primer_schemes [default: ${params.primerV}]
Expand Down Expand Up @@ -363,20 +365,19 @@ def defaultMSG(){
$params.output\u001B[0m
Primerscheme: $params.primerV
Barcodes on one end enough?: $params.one_end
CPUs to use: $params.cores
Memory in GB: $params.memory
\u001B[1;30m______________________________________\033[0m
""".stripIndent()
}



def v1200_MSG() {
log.info """
1200 bp options are used as primer scheme (V1200)
--minLength set to 1000bp
--maxLength set to 1300bp
--minLength set to 250bp
--maxLength set to 1500bp
\u001B[1;30m______________________________________\033[0m
""".stripIndent()
}

0 comments on commit 276db92

Please sign in to comment.