Entering edit mode
21 months ago
fatemeh
•
0
I want to delete the part starting after "CDS" until "p". And the characters between CDS and p vary.
I have a header like this:
>Eindica.01T000001.1 CDS=1-201_p
ATGACTAGGGAACGTGGACGACCAGCAAGGGCTTGGAAGCCAAGGCAGGGATTAG
>Eindica.01T000002.1 CDS=1-3027_p
ATGACCTTCTATGGATACACACAACACTCCTTAA
>Eindica.01T000005.1 CDS=577-4218_p
CCAAGGCCAAAAAATACATTTCTAAGGCCAAAGCTTGGCTTGAATGAATCTTGA
and I want to keep the header like this:
>Eindica.01T000001.1
ATGACTAGGGAACGTGGACGACCAGCAAGGGCTTGGAAGCCAAGGCAGGGATTAG
>Eindica.01T000002.1
ATGACCTTCTATGGATACACACAACACTCCTTAA
>Eindica.01T000005.1
CCAAGGCCAAAAAATACATTTCTAAGGCCAAAGCTTGGCTTGAATGAATCTTGA
Can someone help me with a solution? Would be great. Thank you.
Use
cut -d ' '