Question: FASTA file to Karyotype file
gravatar for The Last Word
2.7 years ago by
The Last Word170
The Last Word170 wrote:

I am trying to use Circos and in order to do so, I have to convert my FASTA file into a Karyotype input file. Is there any way to do so? I know that there is another similar question which was asked two years ago but I am looking for any update that might have come in the past two years to make this easier. Also, is there a methodology to compare two transcriptomes in Circos. I have noticed papers with comparisons shown in the form of circos images. If Circos only accepts a karyotype file at a time, how is that done? I am relatively new to Circos and hence all the questions. Please help.

circos karyotype fasta • 1.7k views
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by The Last Word170
gravatar for Sej Modha
2.7 years ago by
Sej Modha4.1k
Glasgow, UK
Sej Modha4.1k wrote:

You could use simple bash solution to convert a fasta file to a karyotype file by parsing the header and the size of the fasta sequences. Following awk command would do the job and would print fastsa headers as column 3 and 4 for label and identifier for each sequence. cat file.fa | awk '$0 ~ ">" {print c; c=0;printf "chr - " substr($0,2,100) " " substr($0,2,100) " " "0" " "; } $0 !~ ">" {c+=length($0);} END { print c; }'

ADD COMMENTlink written 2.7 years ago by Sej Modha4.1k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 966 users visited in the last hour