Skip to content

Commit

Permalink
Merge pull request #41 from fmalmeida/fmalmeida/sra-nbci-fetch-and-pr…
Browse files Browse the repository at this point in the history
…eprossing-40

fix module for downloading PACBIO data
  • Loading branch information
fmalmeida authored May 10, 2024
2 parents 391b1c7 + 691c6ab commit 61b2aab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ It wraps up the following software:
| :--- | :---- |
| SRA NBCI fetch | [Entrez-direct](https://anaconda.org/bioconda/entrez-direct) & [sra-tools](https://github.com/ncbi/sra-tools) |
| Illumina pre-processing | [Fastp](https://github.com/OpenGene/fastp) |
| Nanopore pre-processing | [Porechop](https://github.com/rrwick/Porechop), [pycoQC](https://github.com/tleonardi/pycoQC), [NanoPack](https://github.com/wdecoster/nanopack) |
| Nanopore pre-processing | [Porechop](https://github.com/rrwick/Porechop), [Porechop ABI](https://github.com/bonsai-team/Porechop_ABI), [pycoQC](https://github.com/tleonardi/pycoQC), [NanoPack](https://github.com/wdecoster/nanopack) |
| Pacbio pre-processing | [bam2fastx](https://github.com/PacificBiosciences/pbtk#bam2fastx), [bax2bam](https://anaconda.org/bioconda/bax2bam), [lima](https://github.com/PacificBiosciences/barcoding), [pacbio ccs](https://ccs.how/) |

## Further reading
Expand Down
16 changes: 14 additions & 2 deletions modules/get_fastq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ process GET_FASTQ {
def sra_ids = "${sra_ids.replaceAll(~/\s/,'')}"
"""
fasterq-dump \\
--include-technical \\
--split-files \\
--threads $task.cpus \\
--outdir ./${sra_ids}_data \\
Expand All @@ -26,12 +25,25 @@ process GET_FASTQ {
if [ \$(grep -ic "is PACBIO, please use fastq-dump instead" fasterq-dump.err) -eq 1 ]
then
fastq-dump \\
--split-files \\
--gzip \\
--outdir ./${sra_ids}_data \\
$sra_ids
else
echo "fasterq-dump error was:"
cat fasterq-dump.err
fi
# make sure they have right extension
for i in \$( find ./${sra_ids}_data -name "*.fq" ) ; do
mv \$i \${i%%.fq}.fastq ;
done
for i in \$( find ./${sra_ids}_data -name "*.fq.gz" ) ; do
mv \$i \${i%%.fq.gz}.fastq.gz ;
done
# make sure data is compressed
for i in \$( find ./${sra_ids}_data -name "*.fastq" ) ; do
gzip \$i ;
done
"""
}

0 comments on commit 61b2aab

Please sign in to comment.