Entering edit mode
Claire Wilson
▴
280
@claire-wilson-273
Last seen 10.3 years ago
Hi,
This may seem slightly off topic, but relates to one of the
Bioconductor tutorials. First of all I have list of significant probe
ids (say 5). I then get all the abstracts for these doing:
abstracts <- pm.getabst(genes, "hu6800")
This gives me a list of length 5 where each entry is a list of objects
of class pubMedAbst. I then identify all abstracts with my keyword of
interest in using:
has.word <- sapply(abstracts, function (x)
pm.abstGrep("keyword", x))
which returns a list of length 5, each entry corresponding to a
logical vector with the values TRUE or FALSE depending on whether that
abstract contained the keyword or not. Now I want to make a new list
that only contains the abstracts with the keyword in it. Essentially
I need to keep all instances of abstracts that correspond to TRUE in
has.word. I have tried many ways of doing this, starting with unlist.
Unlist comes back null for abstracts. I eventually ended up with a
bulky, loop construct, but wondered if there was an easier way.
Many thanks in advance, apologies if this is a bit long
winded/directed to the wrong people.
Claire
--
Claire Wilson, PhD
Bioinformatics group
Paterson Institute for Cancer Research
Christies Hospital NHS Trust
Wilmslow Road,
Withington
Manchester
M20 4BX
tel: +44 (0)161 446 8218
--------------------------------------------------------
This email is confidential and intended solely for the use of the
person(s) ('the intended recipient') to whom it was addressed. Any
views or opinions presented are solely those of the author and do not
necessarily represent those of the Paterson Institute for Cancer
Research or the Christie Hospital NHS Trust. It may contain
information that is privileged & confidential within the meaning of
applicable law. Accordingly any dissemination, distribution, copying,
or other use of this message, or any of its contents, by any person
other than the intended recipient may constitute a breach of civil or
criminal law and is strictly prohibited. If you are NOT the intended
recipient please contact the sender and dispose of this e-mail as soon
as possible.