How do you make a Bash script put output files in a specific directory
0
0
Entering edit mode
5.4 years ago
tmrhyd • 0

So I have a script for bwa to align a chloroplast to a genome I have.(of a plant) It's a bash script and I have "#SBATCH -o output_file" before the script. I want this output file to go into an already existing directory. How do I do this?

Thank you guys so much!!

genome • 793 views
ADD COMMENT
0
Entering edit mode

Without seeing your entire script following advice is necessarily generic. In your bwa command you could add full path before the output file name (e.g. bwa mem genome.fa reads.fastq | samtools sort -o /path_to_directory_you_want/alignment.bam). If you are using private variables then set out=/path_to_dir_you_want and then use ${out}/actual.bam in your command).

ADD REPLY

Login before adding your answer.

Traffic: 1518 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6