OP wants to filter (keep) only the records from hepatitis, not rename everything to hepatitis...
• 0 views
•
link
Hi All,
I have the following FASTA file.....
>NC_001434.1 Hepatitis E virus, complete genome
GCCATGGAGGCCCATCAGTTTATTAAGGCTCCTGGCATCACTACTGCTATTGAGCAGGCTGCTCTAGCAGCGGCCAACTCTGCCCTTGCGA............
>AB189071.1 Hepatitis E virus genomic RNA, nearly complete genome, isolate: JDEER-Hyo03L
GTCGATGCCATGGAGGCCCACCAGTTTATTAAGGCTCCTGGCATTACTACTGCCATTGAGCAGGCTGCTCTGGCTGCGGCCAACTCCGCCTT...................
>AB220979.1 Hepatitis E virus genomic RNA, complete genome, genotype 4, isolate: HE-JA41
GCAGACCACGTATGTGGTCGACGCCATGGAGGCCCACCAGTTCATAAAGGCTCCTGGCGTCACTACTGCTATTGAGCAGGCAGCTCTAGCAGC......................
>AB220974.1 Hepatitis E virus genomic RNA, complete genome, genotype 4, isolate: HE-JA2
GCAGACCACGTATGTGGTCGACGCCATGGAGGCCCATCAGTTCATAAAGGCTCCTGGCGTCACTACTGCTATTGAGCAGGCAGCTCTAGCAGCGG...................
>JQ001749.1 Bat hepevirus isolate BatHEV/BS7/GE/2009, complete genome
GCATCCTTGCCACAGAGTCCATGGTCCGCCGCCATGGACATTTCACAGTGGTCCGCCCCGAAGGGGGCGGGCGCAGCCTTCGAAGCGTACGCTCA............
>NW_006725532.1 Balaenoptera acutorostrata scammoni unplaced genomic scaffold, BalAcu1.0 scaffold126, whole genome shotgun sequence
CGCGACCCAGATGGTCCAGGGAGCCCCTTCCATGACTGCGGGCGCCGGCGTCGCTGGGGGTCGTGTGTAAAGACAAAGGCTTCGTCTGCCTC.......................
>DS547128.1 Laccaria bicolor S238N-H82 LACBIscaffold_38 genomic scaffold, whole genome shotgun sequence
AGGAGTTTGAAACGATTTGACCTTTGGCTGAATTATGCCACAACCGCTACACTCCGGGCCTCCAAATTTTGTGTGGTGGTGAATGTGTATCTCATGAACATGAATATATTTTTA..........
My query is that I just want to retain the sequences with keyword Hepatitis and want to delete the remaining entries. I would appreciate if somebody can suggest me the code to do so.
Thanks...
maybe can try to substitute the ID that start with symbol ">" to Hepatitis. You can do this in linux command
sed 's/^ >.*/Hepatitis/' < hepatitis.fasta > NewIDHepatitis.fasta
OP wants to filter (keep) only the records from hepatitis, not rename everything to hepatitis...
Log in to answer this question.
I added markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
Let me google that for you
Hello s_bio!
Questions similar to yours can already be found at:
We have closed your question to allow us to keep similar content in the same thread.
If you disagree with this please tell us why in a reply below. We'll be happy to talk about it.
Cheers!
@Pierre, Thanks for the link. Could find the answer......