Entering edit mode
5.6 years ago
Kumar
▴
120
I know, how to count the length of a particular fasta sequence. But, I need to count the length of a particular fasta sequence based on the header listed in another txt file. The base length to be printed in another/specified excel file at column number 3. Therefore, please help me to do the same. Thank you in advance.
What have you tried? There are definitely solutions for this on the forum already.
Dear healey, The below command can list out the base length of each fasta sequences of the file,
But, I do not know, how to print the specified header's length listed in another txt file. Moreover, how to print the length in another excel sheet.
You will have to provide sample data.
Suppose, I have a multi fasta sequences in org1.fasta as given below,
I need to count the length of following header's listed in id.txt as given below,
And the results(length) to be printed at 3rd coloumn (Total length) of another csv file org.csv as shown below,
just add
|paste - -
unique.fasta
stdout
If you need
hit_length
as the 2nd column there, then use a combination of GNU utilitiespaste
andcut
col3
Combine the files together
This assumes that the order is the same in your results example and in the unique.fasta file
what is
hit_length
ID
andhit_length
columns are the existing data of csv file. I need to print the length at 3rd column as I specified with in * symbol.