gene contains only ATGC

3 Ansichten (letzte 30 Tage)
Oded Scharf
Oded Scharf am 10 Jun. 2018
Beantwortet: Rik am 10 Jun. 2018
I have a list of genes (strings of letters) and I want delete the ones that has letters other than ATGC (N for example). how can I do it?
Thank you!

Akzeptierte Antwort

Rik
Rik am 10 Jun. 2018
You just want to remove the invalid letters? The code below will do that. If you want to check if a gene string is invalid you can check that with any(~L).
gene='ATTCAGN';
L=ismember(gene,'ATGC');
gene=gene(L);

Weitere Antworten (0)

Kategorien

Mehr zu Genomics and Next Generation Sequencing finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by