Question: extract one specie, fasta file sequences
0
gravatar for mgadrianam
3.8 years ago by
mgadrianam20
Colombia
mgadrianam20 wrote:

Hi

I have a file with microRNAs sequences of different species and I want a file with only human microRNAs

">hsa-miR-130b-3p MIMAT0000691 Homo sapiens miR-130b-3p"

CAGUGCAAUGAUGAAAGGGCAU

">hsa-miR-30e-5p MIMAT0000692 Homo sapiens miR-30e-5p"

UGUAAACAUCCUUGACUGGAAG

">hsa-miR-30e-3p MIMAT0000693 Homo sapiens miR-30e-3p"

CUUUCAGUCGGAUGUUUACAGC

">hsa-miR-26a-2-3p MIMAT0004681 Homo sapiens miR-26a-2-3p"

CCUAUUCUUGAUUACUUGUUUC
">cbr-miR-72 MIMAT0000694 Caenorhabditis briggsae miR-72"

AGGCAGAUGUUGGCAUAGC

">cel-miR-354-5p MIMAT0031894 Caenorhabditis elegans miR-354-5p"

GGUGCGGCUGCAGACGGGUAU

">cel-miR-354-3p MIMAT0000696 Caenorhabditis elegans miR-354-3p"

ACCUUGUUUGUUGCUGCUCCU

">cel-miR-355-5p MIMAT0000697 Caenorhabditis elegans miR-355-5p"

UUUGUUUUAGCCUGAGCUAUG

I use this comand: grep "^>hsa" mature.fa > mature_hsa.fa

but I only had the first line

">hsa-let-7a-5p MIMAT0000062 Homo sapiens let-7a-5p"

">hsa-let-7a-3p MIMAT0004481 Homo sapiens let-7a-3p"

">hsa-let-7a-2-3p MIMAT0010195 Homo sapiens let-7a-2-3p"

">hsa-let-7b-5p MIMAT0000063 Homo sapiens let-7b-5p"

">hsa-let-7b-3p MIMAT0004482 Homo sapiens let-7b-3p"

">hsa-let-7c-5p MIMAT0000064 Homo sapiens let-7c-5p"

">hsa-let-7c-3p MIMAT0026472 Homo sapiens let-7c-3p"

">hsa-let-7d-5p MIMAT0000065 Homo sapiens let-7d-5p"

">hsa-let-7d-3p MIMAT0004484 Homo sapiens let-7d-3p"

">hsa-let-7e-5p MIMAT0000066 Homo sapiens let-7e-5p"

How I can have the sequence also.

Thanks very much

sequence fasta • 1.6k views
ADD COMMENTlink modified 3.8 years ago by genomax80k • written 3.8 years ago by mgadrianam20
1

please search this site for "Filtering fasta". It has already been answered a gazillion times.

ADD REPLYlink written 3.8 years ago by Pierre Lindenbaum127k
1

You are looking for

grep -A 1 --no-group-separator "^>hsa" mature.fa > mature_hsa.fa

Look at man grep to see options it can take.

ADD REPLYlink modified 3.8 years ago • written 3.8 years ago by genomax80k

Thanks you very much!! it works, I tried before with -A (--after-context) but I did not add the number

Thanks again,

Adriana

ADD REPLYlink written 3.8 years ago by mgadrianam20

there seams to be something wrong with the "line end" marker in your example. Maybe you have used Microsoft word as text editor.

ADD REPLYlink written 3.8 years ago by piet1.7k
Please log in to add an answer.

Help
Access

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