Skip to content

Commit

Permalink
use a different output extension if --fasta is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Feb 22, 2024
1 parent 2f187ce commit 986a090
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cutadapt/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,26 @@ echo ">> Output arguments"
[[ "$par_fasta" == "false" ]] && unset par_fasta
[[ "$par_info_file" == "false" ]] && unset par_info_file

if [[ -z $par_fasta ]]; then
ext="fastq"
else
ext="fa"
fi

if [ $mode = "se" ]; then
output_args=$(echo \
${par_report:+--report "${par_report}"} \
${par_json:+--json "${par_output}/report.json"} \
--output "$par_output/{name}_R1_001.fastq" \
--output "$par_output/{name}_001.$ext" \
${par_fasta:+--fasta} \
${par_info_file:+--info-file} \
)
else
output_args=$(echo \
${par_report:+--report "${par_report}"} \
${par_json:+--json "${par_output}/report.json"} \
--output "$par_output/{name}_R1_001.fastq" \
--paired-output "$par_output/{name}_R2_001.fastq" \
--output "$par_output/{name}_R1_001.$ext" \
--paired-output "$par_output/{name}_R2_001.$ext" \
${par_fasta:+--fasta} \
${par_info_file:+--info-file} \
)
Expand Down

0 comments on commit 986a090

Please sign in to comment.