This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to run faToTwoBit on the FASTA format sequence?

Hello, I am trying to convert the FASTA sequence in to two-bit format by faToTwoBit program downloaded from UCSC genome browser. I have converted it to executable bit but am unable to run the program on my FASTA sequence. What is the command line to run it?Please help.

fatotwobit

1 answer

If you run the program on its own without any options it will show you how to use it

$ ./faToTwoBit 
faToTwoBit - Convert DNA from fasta to 2bit format
usage:
   faToTwoBit in.fa [in2.fa in3.fa ...] out.2bit

So use one or more input fasta files and provide an output name out.2bit.

I have found this usage but did not understand it, please clarify.

I have put this command faToTwoBit Chr1.fa out.2bit but the terminal shows faToTwoBit: command not found....why is this happening?

command not found....why is this happening?

That is because the directory you are in is not part of $PATH.

Use as follows (replace with real names you have/need). Note the period and slash before program name.

$ ./faTwoBit your_file.fa name_for_2bit_file.2bit

I did as you mentioned. I put the command ./faToTwoBit Chr1.fa.2bit This appeared again:

faToTwoBit - Convert DNA from fasta to 2bit format usage: faToTwoBit in.fa [in2.fa in3.fa ...] out.2bit options: -long use 64-bit offsets for index. Allow for twoBit to contain more than 4Gb of sequence. NOT COMPATIBLE WITH OLDER CODE. -noMask Ignore lower-case masking in fa file. -stripVersion Strip off version number after '.' for GenBank accessions. -ignoreDups Convert first sequence only if there are duplicate sequence names. Use 'twoBitDup' to find duplicate sequences.

What is wrong in the command?

You need to use

 ./faToTwoBit Chr1.fa Chr1.2bit

Note space separating the two file names.

I have used the command you mentioned, actually nothing happened. It returned to its original $ position again

Yes, I am completely new to Linux and still learning. Thank You! It worked. Thanks for the link too.

Log in to answer this question.