Entering edit mode
5.2 years ago
Oliver
•
0
what this command do for file of CDSs
sed -re 's/(^[^_]+)_.+/\1/gi' your_CDS.fasta > your_CDS.renamed.fasta
what this command do for file of CDSs
sed -re 's/(^[^_]+)_.+/\1/gi' your_CDS.fasta > your_CDS.renamed.fasta
The file your_CDS.fasta
is being manipulated by sed
, which makes use of regular expressions to do so in this case. Just go to a regex tester, for example https://regex101.com and paste (^[^_]+)_.+
in the "REGULAR EXPRESSION" box for a detailed expression of what each part of the regex does.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.