This is a test version of Biostars. For the public version, visit https://www.biostars.org.
file of CDSs

what this command do for file of CDSs

sed -re 's/(^[^_]+)_.+/\1/gi' your_CDS.fasta > your_CDS.renamed.fasta

rna-seq

1 answer

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.

Log in to answer this question.