Entering edit mode
6.7 years ago
Bella_p
▴
70
Hi,
I'm a beginner and starting to write my first Chip-Seq analysis. I'm using Bowtie2, and the first step is to turn fastq file into .sam file. I've written the following command:
${bowtie2_source} -x ${ref_genome} -U ${fastq_file} -S ${target_dir} test1.sam
I have an error in the last part of the script. I want that the .sam file output file will be save in a specific location ({target_dir}) with a specific name (test1). How to fix the script?
A general comment: it's good practice to soft-quote all your variables when you call them (i.e.
${fastq_file} -> "${fastq_file}"
) as this will sometimes catch unexpected expansions of variable names, if they had whitespace or slashes in for example, which could trick your script in to thinking they're separate arguments, rather than one arg with spaces in.