Hello,
I need to use bamtofastq utility described in kallisto | bustools workflow (https://www.kallistobus.tools/install_bamtofastq.html) in order to convert bam files to fastq files for single-cell RNA-seq analysis. I also need to run the bamtofastq utility from my terminal in linux.
So, I have downloaded bamtofastq 1.1.2 (from https://support.10xgenomics.com/docs/bamtofastq), and placed the downloaded bamtofastq.man file in my /home/me/ directory.
From https://support.10xgenomics.com/docs/bamtofastq, they suggested to chmod 700 to make it executable. So, I did as below:
chmod 700 /home/me/bamtofastq.man
export PATH=/home/me/bamtofastq/:$PATH
bamtofastq -h
But, I faced with -bash: bamtofastq: command not found ERROR. As I am new in linux and bash, would you please help me what I did wrong and how I can install bamtofastq utility to use in my terminal?
Thank you so much. Best wishes
Thank you so much for your great guide. I placed bamtofastq.man file to /scratch/me/scRNA1/ directory, and as you mentioned, I did as below, but again I faced with Error :
bamtofastq v1.1.2 Invalid arguments.
Usage: bamtofastq [options] <bam> <output-path> bamtofastq (-h | --help)
and again bamtofastq command not found. I would appreciate your help.
bamtofastq.man
? The link you specified points to a binary file namedbamtofastq
, so where are you getting thisbamtofastq.man
?bamtofastq.man -h
. If that works, runmv /scratch/me/scRNA1/bamtofastq.man /scratch/me/scRNA1/bamtofastq
and you should be able to usebamtofastq
instead ofbamtofastq.man
as the command.Many thanks. I downloaded bamtofastq.man from this https://support.10xgenomics.com/docs/bamtofastq site, and I just clicked on Download bamtofastq 1.1.2 icon in the Download & Installation part.
May I kindly ask what do you mean by I am not passing any arguments? what are these arguments and how should I pass them?
Thanks a lot.
When you try to run a program you need to provide some input (and output file(s)) for the program to do its work on. These are called arguments.
If you run
bamtofastq -h
you can see what input the program minimally is expecting from you to be able to run in the usage statement it prints:So now if you add a
-h
you get:So your
bamtofastq
command will need to have (option(s) from the list above, if needed), name of your bam file and a path/filename(s) to store convered fastq reads at.That helped a lot. Many thanks for your great explanation and guide.