This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Reformat fasta header

Hi,

I have trouble to reformat my current fasta file header. This is the header it need to be like:

>tRNA_name predicted_anti-codon_positions

This is my current header:

>chrA01_622419_622487_+_Sup_TTA_28.44
>chrA01_2528533_2528604_+_His_GTG_63.70

This is the fileformat I could extract the anti codon position from:

chrA01.trna1 (622419-622487)    Length: 69 bp
Type: Sup   Anticodon: TTA at 33-35 (622451-622453) Score: 28.44
Possible pseudogene:  HMM Sc=-4.46  Sec struct Sc=32.90
         *    |    *    |    *    |    *    |    *    |    *    |    *   
Seq: AGATCTGTAaGCTCAAaaTGGTAGAGCTCTCGTTATGAGAGTtTGGTGGTTCGAATCCACCCAGATCTG
Str: >>>>>>>...>>>>.........<<<<.>>>.....<<<.....>>>>>.......<<<<<<<<<<<<.

chrA01.trna2 (2528533-2528604)  Length: 72 bp
Type: His   Anticodon: GTG at 34-36 (2528566-2528568)   Score: 63.70
         *    |    *    |    *    |    *    |    *    |    *    |    *    | 
Seq: GTGGCTGTAGTTTAGTGGTgAGAATTCCACGTTGTGGCCGTGGAGACCTGGGCTCGAATCCCAGCAGCCACA
Str: >>>>>>>..>>>>........<<<<.>>>>>.......<<<<<....>>>>>.......<<<<<<<<<<<<.

Any suggestions on how to solve this issue? Christian

sequence gene

Hello,

I am having trouble identifying which are the fields you need to extract. This is your current header:

chrA01_2528533_2528604_+_His_GTG_63.70

and you want it to be like this:

tRNA_name \t predicted_anti-codon_positions

Is the "chrA01" the tRNA name? and "2528533_2528604" the positions in the sequence? If so, is this what you want?:

chrA01 \t 2528533_2528604

Or am I wrong? I am unsure if I understood right

This is not an answer, it is a request for clarification. It belongs in a comment. I'm moving it to one now.

(Ups, sorry an thank you, I am new to this)

The original description is unclear and badly formatted. My guess is @weissert wants the headers to look like this:

> sup \t (assume that would be just a tab) 22419-622487
> his \t (assume that would be just a tab) 2528533-2528604

To clarify my question. I have two files one is in fasta format the other one is the cove output of tRNAscanSE, indicating the secodnary structure of my tRNA and the position of the Anticodon.

I want my header like this:

>Sup_TTA(Anticodon)  33-35(Anticodon positiion)
>His_GTG 34-36

0 answers

No answers yet.

Log in to answer this question.