[Waiting on OP] perl script to grep a part of header from fasta seq file
0
0
Entering edit mode
6.3 years ago
h_asma • 0

Hello

I want a perl script to extract name of cis regulatory module ("Sry-alpha_CANBG ") chromosome number ("2R") and coordinate (2377048_2377297) in a tab separated format from this header

>Sry-alpha_CANBG:Dmel:3R:25866821-25867071_2R_2377048_2377297
 ^-------------^                           ^^ ^-------------^

Output should look like this:

Sry-alpha_CANBG   2R   2377048   2377297

I have tried this

grep "^>"  filename.fasta

but this returns all the headers. And as theses are variables I can't use specific pattern to find and replace it with nothing. Any suggestions would be appreciated

Thanks

perl • 215 views
ADD COMMENT
1
Entering edit mode

As you are a new user, you should know that first you need to try something yourself, in awk/perl or whatever language, and if you still cant figure out, people help in modifying your script/command.

People here doesn't provide ready-made scripts as per your requirements.

There are many many posts on this forum handling fasta headers. So check them.

ADD REPLY
1
Entering edit mode

I want a perl script

what have you tried ?

ADD REPLY
0
Entering edit mode

Hello hasiba.asma!

I'm closing your post until you add information on what you've tried. Once you add that information, I will open the post so people can answer your question.

ADD REPLY

Login before adding your answer.

Traffic: 1511 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6