Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix module for downloading PACBIO data #41

Merged
merged 6 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
"""
}
Loading