<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear Maxime,<br>
<br>
what you obtain is something which is expected: you may have several
sequences for each species.<br>
<br>
The namesp list will not give you the name of the species associated
to each sequence, but the list of all species which are associated
to the list of sequences.<br>
<br>
For example if you try<br>
<pre wrap="">query("seqsp","sp=PAPAVER ORIENTALE and K=rbcl")</pre>
<br>
you get 2 sequences from the same unique species PAPAVER ORIENTAL
(taxid 22694)<br>
<br>
I hope this answer to your question<br>
<br>
all the best,<br>
<br>
Simon<br>
<br>
<br>
<br>
<br>
Le 08/06/12 09:41, Maxime Réjou-Méchain a écrit :
<blockquote
cite="mid:CAEem9_GgTHGjGzHMy2Hs9hD2i2ADQUWLyW7=fA-8vsHfaX0U9w@mail.gmail.com"
type="cite">
<pre wrap="">Dear all,
here I come again for a problem with the query function. I still have some
difficulties to obtain all the taxa names of my retrieve sequences.
Here is my code:
</pre>
<blockquote type="cite">
<pre wrap="">query("seqsp","sp=eudicotyledons and K=rbcl")
TOTseq=sapply(seqsp$req, getSequence, as.string = TRUE)
length(TOTseq)
</pre>
</blockquote>
<pre wrap="">30609
</pre>
<blockquote type="cite">
<pre wrap="">TOTname=getName(seqsp)
length(TOTname)
</pre>
</blockquote>
<pre wrap="">30609
</pre>
<blockquote type="cite">
<pre wrap="">query("sp","PS seqsp")
namesp=getName(sp)
length(namesp)
</pre>
</blockquote>
<pre wrap="">15831
As cou can see, the length of my namesp vector is much lower than the
number of retrieved sequences and I do not understand why.
Is someone can explain me why I can not retrieve all the taxa names
associated with each sequence?
Many thanks in advance for your help,
Maxime
2012/5/31 Maxime Réjou-Méchain <a class="moz-txt-link-rfc2396E" href="mailto:maxime.rejou@gmail.com"><maxime.rejou@gmail.com></a>
</pre>
<blockquote type="cite">
<pre wrap="">This is indeed a great solution,
Many Thanks!
Maxime
2012/5/31 Leonor Palmeira <a class="moz-txt-link-rfc2396E" href="mailto:mlpalmeira@ulg.ac.be"><mlpalmeira@ulg.ac.be></a>
</pre>
<blockquote type="cite">
<pre wrap="">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dear Maxime,
what you could try is get all species that are in "genbank" by:
query("seqsp","K=rbcl", virtual=T)
and then project all these sequences to species:
query("sp","PS seqsp")
namesp=getName(sp)
Once you have all the species names present in "genbank", you can make a
condition on the iteration on 'Genustobefind', if you don't match a name
in 'namesp', the query is not sent.
Best,
Leonor.
On 31/05/12 15:33, Maxime Réjou-Méchain wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Dear all,
I am currently using a loop with the function query to know which
</pre>
</blockquote>
<pre wrap="">genera in
</pre>
<blockquote type="cite">
<pre wrap="">my list (n>2000 genera) have some sequences in genbank.
Here is the loop:
choosebank("genbank")
sequences=vector(mode="numeric",length=length(Genustobefind))
for (i in 1:length(Genustobefind)){
print(paste("Retrieving sequence ",Genustobefind[i]," i=",i,sep=""))
query1=paste("SP=",Genustobefind[i], " AND K=rbcl", sep="")
query("bb", query1,virtual=T)
sequences[i]=bb$nelem
}
The loop work well but a lot of genera block the query function. For
example, if I do
query("bb", "SP=Acanthodium AND K=rbcl",virtual=T)
The function run without stopping. I thus have to break the loop.
For information, if I submit manually the genera that block the query
function to genbank I obtain in the main cases:
- The following term was not found in Nucleotide: Acanthodium.
- See the search
details<a class="moz-txt-link-rfc2396E" href="http://www.ncbi.nlm.nih.gov/nuccore/details?querykey=1"><http://www.ncbi.nlm.nih.gov/nuccore/details?querykey=1></a>.
- No items found.
In fact all these genera are not present in Genbank. Have you any idea
</pre>
</blockquote>
<pre wrap="">to
</pre>
<blockquote type="cite">
<pre wrap="">overcome this problem? I just want to have a value of zero for these
</pre>
</blockquote>
<pre wrap="">genera
</pre>
<blockquote type="cite">
<pre wrap="">and to continue my loop.
Many thanks in advance for your help,
Maxime
_______________________________________________
Seqinr-forum mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Seqinr-forum@lists.r-forge.r-project.org">Seqinr-forum@lists.r-forge.r-project.org</a>
</pre>
</blockquote>
<pre wrap=""><a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum</a>
- --
Leonor Palmeira, PhD
Phone: +32 4 366 42 69
Email: mlpalmeira AT ulg DOT ac DOT be
<a class="moz-txt-link-freetext" href="http://sites.google.com/site/leonorpalmeira">http://sites.google.com/site/leonorpalmeira</a>
Immunology-Vaccinology, Bat. B43b
Faculty of Veterinary Medicine
Boulevard de Colonster, 20
University of Liege, B-4000 Liege (Sart-Tilman)
Belgium
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - <a class="moz-txt-link-freetext" href="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</a>
iQEcBAEBAgAGBQJPx3ZZAAoJEKquFGwgRb3za8gIAMB7kIRp/vciSlvgd9tLdt12
wAZLGpMoP6drWsewDGMfk6yfAeOxGM5Q3U4HkHdzC6ilZ2gL2yEaFMfwEYHSqVFh
EFz7GstvI/6zZ6yAsup6CVlbYOQTPLR7eh9rUB74Ik+IT03tjAyLQc5jp1eRcmmv
nRrv+LqLtRUHnDdR+EWh5O7+AFb3q2h9WyeiTzkAiSmwBnYzioVVocwgt+4WHIDc
+6w0aOrK7JTeHkb7WZTBiqfpqQ+1WLrVf88XNK+TZqB71nFms8losZ1jmJbSNRoZ
r1YoSljG6uhwpT5k3w4uy2JZT+vAv5keoPkFFbtpKyLYoZgdZTH6HYi6Eiv+mJU=
=P3tV
-----END PGP SIGNATURE-----
</pre>
</blockquote>
<pre wrap="">
--
Maxime Réjou-Méchain
Laboratoire Evolution et Diversité Biologique UMR 5174
Centre National Recherche Scientifique/Université Paul Sabatier
Bâtiment 4R1 31062 Toulouse
France
Personal website <a class="moz-txt-link-rfc2396E" href="https://sites.google.com/site/maximerejoumechain/"><https://sites.google.com/site/maximerejoumechain/></a>
+33 (0) 5-61-55-85-81
<a class="moz-txt-link-rfc2396E" href="mailto:maxime.rejou@gmail.com"><maxime.rejou@gmail.com></a>
</pre>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Seqinr-forum mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Seqinr-forum@lists.r-forge.r-project.org">Seqinr-forum@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Simon Penel
Laboratoire de Biometrie et Biologie Evolutive
Bat 711 - CNRS UMR 5558 - Universite Lyon 1
43 bd du 11 novembre 1918 69622 Villeurbanne Cedex
Tel: 04 72 43 29 04 Fax: 04 72 43 13 88
<a class="moz-txt-link-freetext" href="http://lbbe.univ-lyon1.fr/-Penel-Simon-.html?lang=fr">http://lbbe.univ-lyon1.fr/-Penel-Simon-.html?lang=fr</a>
ATTENTION NOUVELLE ADRESSE:
<a class="moz-txt-link-abbreviated" href="mailto:simon.penel@univ-lyon1.fr">simon.penel@univ-lyon1.fr</a>
</pre>
</body>
</html>