<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Hi Bow,</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Thank you for the prompt reply.</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Now I am clear about what was going wrong, will rerun the Hmmer analysis with the hmm model files concatenated.</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">I am travelling now and since this analysis was run on our Institute's HPC, I would have have to wait till next week to test this out and reply.</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Regards,</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">--</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">prakhar</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 5, 2015 at 12:37 PM, Wibowo Arindrarto <span dir="ltr"><<a href="mailto:w.arindrarto@gmail.com" target="_blank">w.arindrarto@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Prakhar,<br>
<br>
Thanks for uploading your script and test case, first of all. It helps a lot :).<br>
<br>
As for your question, indeed I saw that your output is a concatenation<br>
of two hmmsearch results. If you would like to parse all query<br>
results, instead you should run hmmsearch with a single input file<br>
containing all of your queries. In other words, instead of<br>
concatenating the results, you should concatenate the input HMMs (a<br>
simple `cat` should do). You will still see the results of each query<br>
separately, and I don't expect them to influence each other.<br>
<br>
This is because the output file begins and ends with a specific<br>
section. When you concatenate two output files, the parser sees that<br>
it has encountered the end section of an output file and stops<br>
parsing. If you run two input HMMs instead, the parser can then see<br>
all the results before encountering the output file's end section.<br>
<br>
Hope this helps :),<br>
Bow<br>
<div><div class="h5"><br>
On Wed, Aug 5, 2015 at 6:00 AM, Prakhar Gaur <<a href="mailto:prakhar.aaidu16@gmail.com">prakhar.aaidu16@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> Biopython & SearchIO user for over three weeks.<br>
><br>
> OS - Ubuntu 14,04<br>
> Biopython Bio.__version__ 1.65<br>
> HMMER -- 3.1b2<br>
> Code is here (github) - branch alpha<br>
><br>
> Briefly, if a hmmer 3 text output is parsed using the 'SearchIO.parse()' and<br>
> that file has output from more than one searches only the first result is<br>
> read and rest are ignored.<br>
><br>
> Details -- Used 'hmmsearch' with pfam models against a database of proteins.<br>
> Since I wanted to club some domain models together, hence concatenated the<br>
> result into a single text file. As all the domains concatenated together<br>
> belong to a single protein.<br>
><br>
> When I use SearchIO.parse() to read this file, the Queryresult object has<br>
> only the top entry (first hmm models result), iterating over the Queryresult<br>
> does not give the other results.<br>
><br>
> To test this I have split the results file to have the results of a single<br>
> hmmsearch run in each file, after this parse works fine.<br>
> But this use case (single result in one file) is for 'SearchIO.read()'.<br>
> Consequently I would expect 'SearchIO.parse()' to be able to parse multiple<br>
> results from a single file.<br>
><br>
> As test case from my repo, first run the script<br>
> 'hmmer-SearchIO-text-parser.py', the output file 'Q9UP38.out' would be read<br>
> this represents the use case in which the result file has multiple (2)<br>
> entries.<br>
><br>
> Are my expectations from 'SearchIO.parse()' correct ? Or am I missing<br>
> something ?<br>
><br>
> Reply, Comments, Pointers etc. are all welcome.<br>
><br>
> --<br>
> Thanking you,<br>
> --<br>
> Prakhar Gaur<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Biopython mailing list - <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
> <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Thanking you,<br>-- <br>Prakhar Gaur<br><br></div>
</div>