Borrar filtros
Borrar filtros

FIND A SPECIFIC ELEMENT WITHIN A LIST OF GENE SYMBOLS

1 visualización (últimos 30 días)
Sa
Sa el 24 de Abr. de 2020
Comentada: Sa el 27 de Abr. de 2020
Hello everybody,
Could anyone suggest to me which kind of function I can use to find a specifi element whithin a list of gene symbols? I tried to use find but I couldn't get what I needed. Probably, I didn't use this function in a proper way.
Thanks for your help
  4 comentarios
darova
darova el 24 de Abr. de 2020
or contains
Sa
Sa el 24 de Abr. de 2020
Ok, Thanks a lot.
Can I write something like that:
index = find (contains(MOUSEMATLAB,'March5'))
in which MOUSEMATLAB is my list of gene symbols and March5 is the specific element that I'm looking for.
I tried to use it and I got this:
Did you mean:
>> index = find (contains(MOUSEMATLAB,'March5'));
I don't understand what it means.
Thanks

Iniciar sesión para comentar.

Respuesta aceptada

Sa
Sa el 24 de Abr. de 2020
Probe Set ID Gene Symbol
1415670_at Copg1
1415671_at Atp6v0d1
1415672_at Golga7
1415673_at Psph
1415674_a_at Trappc4
1415675_at Dpm2
This is part of the list that I have. For instance, I need to find a specific gene symbol such as Copg1 and its corresponding probeset ID whithin this list.
Thanks
  2 comentarios
darova
darova el 24 de Abr. de 2020
Please use comments section. Don't produce answer
Sa
Sa el 24 de Abr. de 2020
ok, sorry!

Iniciar sesión para comentar.

Más respuestas (1)

darova
darova el 24 de Abr. de 2020
Try this
A = readtable('data.txt','delimiter','\t')
GENE = table2array(A(:,2)); % convert to cell
ix = strfind(GENE, 'Copg1'); % search in each cell
ix = cellfun(@isempty,ix); % find empty cells
A(~ix,1) % display ID
  16 comentarios
darova
darova el 26 de Abr. de 2020
What does it supposed to mean?
Sa
Sa el 27 de Abr. de 2020
OK, perfect. Really, thanks a lot

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by