I want to filter fastafile using awk. The inpute file looks like
Input file:
>cel-miR-49 MIMAT0000020 Caenorhabditis elegans miR-49
AAGCACCACGAGAAGCUGCAGA
>cel-miR-50 MIMAT0000021 Caenorhabditis elegans miR-50
UGAUAUGUCUGGUAUUCUUGGG
>cel-miR-51 MIMAT0000022 Caenorhabditis elegans miR-51
UACCCGUAGCUCCUAUCCAUGUU
>hsa-miR-28-3p MIMAT0004502 Homo sapiens miR-28-3p
CACUAGAUUGUGAGCUCCUGGA
>hsa-miR-29a MIMAT0000086 Homo sapiens miR-29a
UAGCACCAUCUGAAAUCGGUUA
>hsa-miR-30a MIMAT0000087 Homo sapiens miR-30a
UGUAAACAUCCUCGACUGGAAG
>hsa-miR-31 MIMAT0000089 Homo sapiens miR-31
AGGCAAGAUGCUGGCAUAGCU
Is there easy to filter only sequence with >hsa? grep only return the fasta header not the sequence. I need the fasta header with the sequence
Dereje
Input file:
>cel-miR-49 MIMAT0000020 Caenorhabditis elegans miR-49
AAGCACCACGAGAAGCUGCAGA
>cel-miR-50 MIMAT0000021 Caenorhabditis elegans miR-50
UGAUAUGUCUGGUAUUCUUGGG
>cel-miR-51 MIMAT0000022 Caenorhabditis elegans miR-51
UACCCGUAGCUCCUAUCCAUGUU
>hsa-miR-28-3p MIMAT0004502 Homo sapiens miR-28-3p
CACUAGAUUGUGAGCUCCUGGA
>hsa-miR-29a MIMAT0000086 Homo sapiens miR-29a
UAGCACCAUCUGAAAUCGGUUA
>hsa-miR-30a MIMAT0000087 Homo sapiens miR-30a
UGUAAACAUCCUCGACUGGAAG
>hsa-miR-31 MIMAT0000089 Homo sapiens miR-31
AGGCAAGAUGCUGGCAUAGCU
Is there easy to filter only sequence with >hsa? grep only return the fasta header not the sequence. I need the fasta header with the sequence
Dereje