Skip to content

Commit

Permalink
fix module for downloading PACBIO data
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalmeida committed May 10, 2024
1 parent cea2291 commit 691c6ab
Showing 1 changed file with 14 additions and 2 deletions.
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 691c6ab

Please sign in to comment.