This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Addressing the path in mac OX

Hi,

My sam files are in bowtie2 folder, how I can run samtools on the without having to move sam files from bowtie folder to samtools folder? I have done so;

dhcp179185:~ unknown$ 
dhcp179185:~ unknown$ bash
bash-3.2$ cd /Users/unknown/downloads/bowtie
bash-3.2$ pwd
/Users/unknown/downloads/bowtie
bash-3.2$ export SAM=/Users/unknown/downloads/samtools
bash-3.2$ echo $SAM
/Users/unknown/downloads/samtools
bash-3.2$ pwd
/Users/unknown/downloads/bowtie
bash-3.2$ $SAM/samtools sort SRR193424.sam > SRR193424_sorted.sam
***bash: /Users/unknown/downloads/samtools: No such file or directory***
software error terminal

1 answer

export PATH=$PATH:/Users/unknown/downloads
samtools sort -o SRR193424.bam SRR193424.sam

Or something along those lines. As a rule of thumb, never write SAM files to disk.

Log in to answer this question.