Ivan Gregoretti | 23 May 2013 15:36
Picon

[Biopython] pairwise2 and cpairwise2

One more about pairwise2:

At the bottom of this page
http://biopython.org/DIST/docs/api/Bio.pairwise2-pysrc.html

and in the Biopython tutorial, there are references to a C
implementation of pairwise2, called cpairwise2.

How do you run that C implementation without falling back to pure python?

Thank you,

Ivan

Ivan Gregoretti, PhD
Bioinformatics
_______________________________________________
Biopython mailing list  -  Biopython <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython

Ivan Gregoretti | 23 May 2013 15:07
Picon

[Biopython] Displaying pairwise2 output fails.

Hello Biopythonians,

Are you able to display pairwise alignments? It fails in my system:

from Bio import pairwise2
for a in pairwise2.align.globalxx("ACCGT", "ACG"):
    print format_alignment(*a)

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
NameError: name 'format_alignment' is not defined

Notice that the commands above are just a copy/paste of its docstring.
It should have produced something like this

ACCGT
|||||
AC-G-
  Score=3
<BLANKLINE>
ACCGT
|||||
A-CG-
  Score=3
<BLANKLINE>

My system information (Fedora 18):
Python 2.7.3 (default, Aug  9 2012, 17:23:57)
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
and Biopython 1.61.
(Continue reading)

Frederico Moraes Ferreira | 22 May 2013 21:08
Picon
Picon
Favicon

[Biopython] write one rec to file at once

Hi list,
Is there any way of writing one and only one record to a fastafile, 
without have to open a reclist, append rec to it and only then write the 
reclist to a previous opened file? I was just thinking, if I can read a 
rec at once like:
inrec = SeqIO.read(open(fastafile, "rU"), "fasta")
why not write it at once?
Best,
Fred
_______________________________________________
Biopython mailing list  -  Biopython <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython

Peter Cock | 17 May 2013 10:55
Gravatar

Re: [Biopython] NCBIXML.parse

On Fri, May 17, 2013 at 5:26 AM, Mic <mictadlo <at> gmail.com> wrote:

> Please find attached the x.blastp.xml file. Do you need more information?
>
>

>>> from Bio.Blast import NCBIXML
>>> with open("x.blastp.xml") as bf:
...     for r in NCBIXML.parse(bf):
...         for a in r.alignments:
...             print r.query, a.hit_id
...
X-snap.4 UniRef90_Q9FX16
(etc)

This matches the first hit in the XML,

          <Hit_num>1</Hit_num>
          <Hit_id>UniRef90_Q9FX16</Hit_id>
          <Hit_def>F12G12.10 protein n=1 Tax=Arabidopsis thaliana
RepID=Q9FX16_ARATH</Hit_def>
          <Hit_accession>UniRef90_Q9FX16</Hit_accession>
          <Hit_len>308</Hit_len>

If you are getting UR090:UniRef90_Q9FX16 then perhaps some other
part of your code is adding the prefix? What else did your code do
(it was incomplete - there were no print statements for example)?

Regards,

(Continue reading)

Mic | 16 May 2013 06:57
Picon

[Biopython] NCBIXML.parse

Hi,
Why does NCBIXML.parse attach UR090 to the UniRef90 ids and as results I
get is UR090:UniRef90_Q9FX16 with the following code:

    with open("x.blastp.xml") as bf:
        blast_records = NCBIXML.parse(bf)

        for blast_record in blast_records:
            query_name = blast_record.query
            for alignment in blast_record.alignments:
                hit_id = alignment.hit_id

Is it possible to remove UR090 or maybe it should be UR090:Q9FX16?

Is UR090:UniRef90_Q9FX16 compatible Gbrowse2?

Thank you in advance.

Mic
_______________________________________________
Biopython mailing list  -  Biopython <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython

Hilmar Lapp | 15 May 2013 22:44
Gravatar

[Biopython] Workshop on Sustainable Software for Science: Practice and Experiences

FYI, if you haven't seen this yet:

http://wssspe.researchcomputing.org.uk/

It seems to me that the Bio* projects, perhaps led by BioPerl as the oldest and thus longest running
(nowadays more fancily called "sustained") of them would have a lot to say about the subject. Anyone
interested in a joint submission?

Also, I notice that Biojava's Andreas is on the organizing committee, so maybe he's been conspiring on
something already :-)

	-hilmar
--

-- 
===========================================================
: Hilmar Lapp -:- Durham, NC -:- hlapp at drycafe dot net :
===========================================================

_______________________________________________
Biopython mailing list  -  Biopython <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython
Norbert Auer | 14 May 2013 18:27
Picon
Favicon

[Biopython] corrupted blast results

Hi,

I have currently some problems using the NCBIWWW.qblast function. I used this query to blast some sequences.

result_handle = NCBIWWW.qblast("blastn", "refseq_genomic", seq_fasta,entrez_query="txid10029 [ORGN]",hitlist_size=2)
save_file = open("blast.xml", "w")
blast_results = result_handle.read()
save_file.write(blast_results)
result_handle.close()

Last time I haven't any problems with this script but today I get only corrupted (not well formed) XML files
back. In my last try I got a correct XML File but after a deeper investigation of this file I found out that the
showed alignment was wrong. The header shows Identities = 660/661 but looking into the alignment shows
that this cannot be true. I used a similar query over the web fronted and got the same hit expect that the
alignment was correct. It seems that there was a insertion of 3 nucleotides in the middle of the subject
sequence. How could this be? I have no explanation for this behaviour.

from the NCBIWWW.qblast function:
Query      241     AAGGCAGGACTGAAGAGTGTCATTATGGGGTGAGCCTTTCAAGGTCCCTGCCACTCTCTC  300
                             |||||||||||||||||||||||||||||||||||||||||         |  |      
Sbjct  1002610  AAGGCAGGACTGAAGAGTGTCATTATGGGGTGAGCCTTTCATCAAGGTCCCTGCCACTCT  1002551

from the web fronted:
Query      241     ACTCTCTTTGTGTACTTTAAAGGTGCTGTGCCCCAAACTCCTGGGACACGGAGAGAACTC  300
              ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sbjct  1169534  ACTCTCTTTGTGTACTTTAAAGGTGCTGTGCCCCAAACTCCTGGGACACGGAGAGAACTC  1169593

I was wondering if this is a NCBI service problem (running on a different server than the web fronted) or is it
a biopython issue?

(Continue reading)

Tomlin, Joshua James | 14 May 2013 02:38
Picon

[Biopython] Installation Help


I'm trying to install biopython on my laptop. I have mac os x 10.7.5, python 2.7, and have installed numpy I believe.
I can run the 'import Bio' command in python without any errors but when I try run 'python setup.py test' I get
6 errors as seen in the output below:

Basically I need to know if I have done everything I need to do correctly? If I have then why are these 6 tests
failing and will that impact my future use of biopython?

Thanks.

Python version: 2.7.4 (v2.7.4:026ee0057e2d, Apr  6 2013, 11:43:10)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
Operating system: posix darwin
test_Ace ... ok
test_AlignIO ... ok
test_AlignIO_FastaIO ... ok
test_AlignIO_convert ... ok
test_BioSQL_MySQLdb ... skipping. Install MySQLdb if you want to use mysql with BioSQL
test_BioSQL_psycopg2 ... skipping. Install psycopg2 if you want to use pg with BioSQL
test_BioSQL_sqlite3 ... ok
test_CAPS ... ok
test_Chi2 ... ok
test_ClustalOmega_tool ... skipping. Install clustalo if you want to use Clustal Omega from Biopython.
test_Clustalw_tool ... skipping. Install clustalw or clustalw2 if you want to use it from Biopython.
test_Cluster ... skipping. If you want to use Bio.Cluster, install NumPy first and then reinstall Biopython
test_CodonTable ... ok
test_CodonUsage ... ok
test_ColorSpiral ... skipping. Install reportlab if you want to use Bio.Graphics.
test_Compass ... ok
test_Crystal ... ok
(Continue reading)

Tomlin, Joshua James | 14 May 2013 06:07
Picon

[Biopython] help - Biopython Install

I'm trying to install biopython on my laptop. I have mac os x 10.7.5, python 2.7, and have installed numpy I believe.
I can run the 'import Bio' command in python without any errors but when I try run 'python setup.py test' I get
6 errors which you can see below.

Basically I need to know if I have done everything I need to do correctly? If I have then why are these 6 tests
failing and will that impact my future use of biopython?

Thanks.

Python version: 2.7.4 (v2.7.4:026ee0057e2d, Apr  6 2013, 11:43:10)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
Operating system: posix darwin
test_Entrez_online ... FAIL
test_SearchIO_write ... FAIL
test_SeqIO_index ... FAIL
test_Tutorial ... FAIL
test_bgzf ... FAIL
Bio.bgzf docstring test ... FAIL
----------------------------------------------------------------------
Ran 213 tests in 296.686 seconds

FAILED (failures = 6)

_______________________________________________
Biopython mailing list  -  Biopython <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython

Andrea García | 5 May 2013 22:21
Picon

[Biopython] How to install tests manually?

Hello all,

I have just installed BioPython using defaults on Windows 7, and it seems
all tests files are missing. I've checked under:

c:\Python27\Lib\site-packages\Bio\

against this directory

https://github.com/biopython/biopython/tree/master/Tests

How can I install the tests manually?

Cheers
_______________________________________________
Biopython mailing list  -  Biopython <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython

Carlos Borroto | 3 May 2013 18:42
Picon
Gravatar

[Biopython] Private '_filenames' attribute in class _SQLiteManySeqFilesDict?

Hi,

I'm writing a tool to index and query a local database using
SeqIO.index_db(). I want to provide something similar to:
$ blastdbcmd -db nt -info
Database: Nucleotide collection (nt)
        17,200,582 sequences; 44,123,601,625 total bases

Date: Feb 7, 2013  4:14 PM      Longest sequence: 65,476,681 bases

Volumes:
        /local/db/blast/nt.00
        /local/db/blast/nt.01
        /local/db/blast/nt.02
        /local/db/blast/nt.03
        /local/db/blast/nt.04
        /local/db/blast/nt.05
        /local/db/blast/nt.06
        /local/db/blast/nt.07
        /local/db/blast/nt.08
        /local/db/blast/nt.09
        /local/db/blast/nt.10
        /local/db/blast/nt.11
        /local/db/blast/nt.12

I have limited Object-Oriented Python's skills, actually very low
exposure to OO in general. The object returned by SeqIO.index_db() has
an attribute '_filenames' which I could use to report "volumes". I
recently read it is a common rule to mark private methods and
attributes with the starting underscore. Would it be safe to use
(Continue reading)


Gmane