I want to convert all the .sra files to .fastq files using the sra toolkit. I did not want to convert each of them
Fortunately, I received assistance from Oleksandr M. with the command line script to convert the formats after many hours of attempts and failures on my own.
Converting .sra to .fastq
- In order to convert all of my .sra files to .fastq in one go, rather than type them all in individually I had to first navigate to the directory (in the command terminal) where all the executable files for the sra toolkit were located.
- It is found in the sratoolkit.2.4.5-2-mac64 / bin
- Once there, I entered $ pwd and was told that directory's location.
- The pwd was " /Users/Elliott/sratoolkit.2.4.5-2-mac64/bin "
- After the source directory was identified, I navigated to the location where all the .sra files were located.
- It is found in ncbi / public / sra
- Once there, I entered the command to begin converting all the .sra files found in this directory to .fastq using the command $ /Users/Elliott/sratoolkit.2.4.5-2-mac64/bin/fastq-dump *.sra
- The first part indicates the source (the sra toolkit in this case) and asterisk (*) indicates to perform that action to ALL the .sra files found in that directory. I believe I could have also told it to put all the newly converted .fastq files into a different directory, but instead it just put them in the current one with the .sra files.
- All the .fastq files were generated into the ncbi / public / sra
- All of the .fastq files were then manually moved from the sra directory into the newly created fastq directory located in ncbi / public/ fastq
//EWW
No comments:
Post a Comment