Code Monkey home page Code Monkey logo

pycogent's Introduction

PyCogent: A toolkit for making sense from sequence

PyCogent is legacy software and no longer maintained. Use cogent3 instead.

See the cogent3 documentation and GitHub source repo.

pycogent's People

Contributors

antgonza avatar cleme avatar clozupone avatar douginator2000 avatar gavinhuttley avatar gawbul avatar genomematt avatar got-dna avatar gregcaporaso avatar huaemilyying avatar i000 avatar jairideout avatar jensreeder avatar jistombaugh avatar jkgoodrich avatar justin212k avatar kylebittinger avatar meganap avatar mikerobeson avatar pm67nz avatar suzuki-shm avatar walterst avatar wasade avatar zaneveld avatar zz2liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pycogent's Issues

Handling Tempfiles

Hello,
I know that windows isn't supported. But the only thing that will not work for me until now is aligning with muscle/clustalw.

I receive the message that a temporary file could not be read, because another process still handles this file.

So if I found out correctly, pycogent has an own method which handles tempfiles. I guess it would be straightforward to use the tempfile-Modul. Maybe then it also runs on windows :)

I'm still exploring the pycogent source code. But I'm unsure if it could be integrated easily.

fin swimmer

Does not build

package directory 'cogent/evolve' does not exist, and indeed it appears not to.

pycogent 1.5.3 fails some tests on OS X 10.7

I'm trying to package pycogent on OS X 10.7 so that it will be available through the Fink project. Packaging proceeds fine, but tests fail with these errors and failures. By default, Fink builds and tests everything as an unprivileged user. If I force the build to run as root, then the tests pass, but this is suboptimal.

======================================================================
ERROR: test_TmpDir (test_app.test_util.CommandLineApplicationTests)
CLAppTester: Alternative TmpDir functions as expected
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 720, in test_TmpDir
    result = app()
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_TmpDir_w_space (test_app.test_util.CommandLineApplicationTests)
CLAppTester: TmpDir functions as expected w space in name
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 748, in test_TmpDir_w_space
    result = app()
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_WorkingDir (test_app.test_util.CommandLineApplicationTests)
CLAppTester: WorkingDir functions as expected
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 663, in test_WorkingDir
    result = app()
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_WorkingDir_w_space (test_app.test_util.CommandLineApplicationTests)
CLAppTester: WorkingDir w/ space in path functions as expected
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 692, in test_WorkingDir_w_space
    result = app()
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_p_data_as_file (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned on, data as file
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 638, in test_p_data_as_file
    result = app([self.data])
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_p_data_as_str (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned on, data as str
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 616, in test_p_data_as_str
    result = app(self.data)
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_p_data_as_str_suppress_stderr (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned on, data as string, suppress stderr
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 527, in test_p_data_as_str_suppress_stderr
    result = app(self.data)
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_p_data_as_str_suppress_stdout (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned on, data as string, suppress stdout
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 549, in test_p_data_as_str_suppress_stdout
    result = app(self.data)
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_p_no_data (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned on, no data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 571, in test_p_no_data
    result = app()
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
ERROR: test_p_space_in_command (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned on, no data, space in command
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 593, in test_p_space_in_command
    result = app()
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 274, in __call__
    out,err,exit_status,self._get_result_paths(data))
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/app/util.py", line 291, in _handle_app_result_build_failure
    raise ApplicationError, "Error constructing CommandLineAppResult."
ApplicationError: Error constructing CommandLineAppResult.

======================================================================
FAIL: test_no_p_data_as_str (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned off, data as string
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 507, in test_no_p_data_as_str
    self.assertEqual(result['StdOut'].read(),'out 43\n')
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/util/unit_test.py", line 316, in failUnlessEqual
    (msg or 'Got %s, but expected %s' % (`observed`, `expected`))
AssertionError: Got '', but expected 'out 43\n'

======================================================================
FAIL: test_no_p_no_d (test_app.test_util.CommandLineApplicationTests)
CLAppTester: parameters turned off, no data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/tests/test_app/test_util.py", line 487, in test_no_p_no_d
    self.assertEqual(result['StdOut'].read(),'out\n')
  File "/sw/build.build/pycogent-py27-1.5.3-1/PyCogent-1.5.3/cogent/util/unit_test.py", line 316, in failUnlessEqual
    (msg or 'Got %s, but expected %s' % (`observed`, `expected`))
AssertionError: Got '', but expected 'out\n'

----------------------------------------------------------------------
Ran 3671 tests in 113.380s

FAILED (failures=2, errors=10)

pycogent alters numpy error handling globally?

I encountered an odd error with numpy arrays recently. Normally, numpy gracefully ignores division error warnings and does not raise exceptions for them, e.g.:

$ python
Python 2.7.3
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.log2(np.array([0.0, np.nan]))
__main__:1: RuntimeWarning: divide by zero encountered in log2
array([-inf,  nan])

This can be changed by calling np.seterr and instructing numpy to raise an exception for these warnings. A piece of code of mine was yielding an exception and I traced the error back to an import call to cogent. Simply importing cogent is sufficient to cause the exception:

>>> import cogent
>>> import numpy as np
>>> np.log2(np.array([0.0, np.nan]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FloatingPointError: divide by zero encountered in log2

I believe there are some global calls to np.seterr somewhere in cogent that cause this -- unless it's somehow a quirk of my installation?

In any case, since it differs from the default numpy behavior, it would be great if these calls can be made local to cogent modules and not alter the global numpy state. The workaround for users for now is to call np.seterr after importing cogent:

import cogent
np.seterr(divide='ignore')

Thanks, --Yarden

RefSeq Transcript IDs from Ensembl Transcripts

Hello,

I'm trying to obtain RefSeq IDs from Esnembl Transcript IDs with Pycogent. I've been failing, I can get the list of transcripts then iterate over them.. but there's no object property refering to this.

I was looking a bit more and found this Ensembl script:
ftp://ftp.ensembl.org/pub/misc-scripts/print_refseq_transcripts.pl

They query "homo_sapiens" database but then they use a logic name: "refseq_human_import". I've no clue how to introduce logic name when loading the genome in pycogent.

Thank you.

TestCase.assertFloatEqual doesn't handle infinity correctly

TestCase.assertFloatEqual sees inf and -inf as equal, while TestCase.assertEqual does not.

For example:

self.assertFloatEqual(float('inf'), float('-inf')) passes, but when comparing inf to -inf this way:

>>> float('inf') == float('-inf')
False

I think the correct behavior is to treat inf and -inf as being different.

QIIME dev does not play nice with PyCogent dev

Using the development versions of both packages, this error has been known to present itself:

$split_libraries_fastq.py
Compiled module "_likelihood_tree" not found. Will use pure Python/NumPy likelihoodihood tree.
Compiled module "_pairwise_pogs" not found. Will use slow Python alignment implementation.
Compiled module "_pairwise_seqs" not found. Will use slow Python alignment implementation.
Traceback (most recent call last):
File "/Users/adro2179/git_repos/qiime/scripts/split_libraries_fastq.py", line 22, in
from qiime.split_libraries import check_map
File "/Users/adro2179/git_repos/qiime/qiime/split_libraries.py", line 51, in
from cogent.align.align import make_dna_scoring_dict, local_pairwise
File "/Users/adro2179/git_repos/pycogent/cogent/align/init.py", line 3, in
from align import make_dna_scoring_dict, _align_pairwise,
File "/Users/adro2179/git_repos/pycogent/cogent/align/align.py", line 6, in
from cogent.align import pairwise, indel_model, pycompare
File "/Users/adro2179/git_repos/pycogent/cogent/align/pairwise.py", line 43, in
versions = [m.version_info for m in [pyrex_seq_align_module, pyrex_align_module]]
AttributeError: 'NoneType' object has no attribute 'version_info'

To get the DNA sequence for a given ENSP

Essentially, I would love a method to do what's described in this perl code using Ensembl Perl API:

use warnings;
use Bio::EnsEMBL::Registry;
my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_registry_from_db( -host => 'ensembldb.ensembl.org', -user => 'anonymous' );
my $transcript_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Transcript' );
my $transcript = $transcript_adaptor->fetch_by_translation_stable_id('ENSP00000411070');
print $transcript->translateable_seq, "
";

allow "." as gap in sequence parser

while "." gaps is widely in sequence alignment, cogent only allows "-" gap by default. The only way I work around this is to define a new moltype, which is not as easy. IMHO, it's worth to include "." gap in the default DNA, RNA, protein moltypes.

1024 - MySQL too many connections

I've a local instance of Ensembl DB (v74) in a local server. Sometimes when I run big queries to this database I end up getting "Too many connections" 1024 error.

For example if I run this code for 100-200 Ensembl Gene IDs to get the Gene symbol there's no problem. For 1000+ genes I get 1024 error.

def ensembl_list_to_hgnc(gene_list):
    account = HostAccount('myserver', 'myuser', 'mypass, port=myport)
    human = Genome('human', Release=74, account=account)

    hgnc_list = []

    for gene in gene_list:
        try:
            time.sleep(.5)
            hgnc_list.append(human.getGeneByStableId(StableId=gene).Symbol)
        except AttributeError:
            continue
        hgnc_list = set(hgnc_list)

    return hgnc_list

I've added pool_recycle=10 to HostAccount but I'm still getting the same error.
How can I force the code to close connection after I get each gene symbol?

KEGG cookbook documentation

Hello,

I find KEGG pathway information very useful and interesting. I would like to know what kind of queries I could do with Pycogent, however documentation is incomplete.

Is this gonna be updated soon?

Thank you very much !

Support for newer releases of Ensembl

It seems like the latest release you support is 67. I think this should be at least clearly stated in the documentation ( it says 68 on your blog)

from cogent.db.ensembl import HostAccount, Genome
human = Genome(Species='human', Release=75)
print human.getDistinct('Effect')

KeyError: 'consequence_type'

human = Genome(Species='human', Release=68)
print human.getDistinct('Effect')

KeyError: 'consequence_type'

 human = Genome(Species='human', Release=67)
print human.getDistinct('Effect')

['3_prime_UTR_variant', 'splice_acceptor_variant', 'intergenic_variant', 'intron_variant', 'incomplete_terminal_codon_variant', 'initiator_codon_change', '5_prime_UTR_variant', 'synonymous_codon', 'inframe_codon_gain', 'stop_retained_variant', 'splice_donor_variant', 'stop_lost', '500B_downstream_variant', 'NMD_transcript_variant', 'inframe_codon_loss', 'splice_region_variant', 'nc_transcript_variant', '5KB_upstream_variant', 'stop_gained', 'coding_sequence_variant', '5KB_downstream_variant', 'frameshift_variant', 'mature_miRNA_variant', 'complex_change_in_transcript', '2KB_upstream_variant', 'non_synonymous_codon']

Do you have any plans of updating cogent?

RefSeq attribute

Hello,
Knowing an Ensembl transcript number is it possible to get the corresponding refseq number? Like this perl ensembl API query? $query->addAttribute("refseq_mrna");
Thanks a lot for your help.
yvan

Why are we not allowed to relabel the root node of a tree?

I would like to be able to relabel the root node of a tree and not have PyCogent die on me.

I'm not sure if this is a bug report or a feature request. 'root' seems to be used deliberately, for instance in

cogent/evolve/likelihood_calculation.py
cogent/evolve/likelihood_function.py
cogent/evolve/parameter_controller.py
cogent/phylo/consensus.py
cogent/phylo/tree_space.py

but I don't see why it should be when functions like TreeNode.isroot() exist.

This code illustrates my problem:

from cogent.evolve.models import HKY85
from cogent import LoadTree

# WORKS:

model = HKY85()
tree = LoadTree(treestring='(A,B,C);')
lf = model.makeLikelihoodFunction(tree)
aln = lf.simulateAlignment(10)
lf.setAlignment(aln)
print lf.reconstructAncestralSeqs()

# DOESN'T WORK:

model = HKY85()
tree = LoadTree(treestring='(A,B,C)Root;') # Note root relabelled
lf = model.makeLikelihoodFunction(tree)
aln = lf.simulateAlignment(10)
lf.setAlignment(aln)
print lf.reconstructAncestralSeqs()

Thanks.

usearch v5.2.236

usearch v5.2.236 is the officially supported version in QIIME 1.6.0 and later as it contains important bug fixes. The application controller was written for v5.2.32, and its unit tests fail when using v5.2.236.

Do we want to update the app controller's tests to work with the new version, or deprecate it by creating a separate application controller for the new version (like we did with RDP, raxml, muscle, etc.)?

Here's the unit test output I get when using v5.2.236:

(pycogent)jrideout@squirrel:~/.virtualenvs/pycogent/pycogent$ python tests/test_app/test_usearch.py
.............F...............
======================================================================
FAIL: test_usearch_cluster_error_correction (__main__.UsearchTests)
Properly clusters seqs for chimera testing/filtering
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_app/test_usearch.py", line 556, in test_usearch_cluster_error_correction
    self.expected_cluster_err_seqs)
  File "/Users/jrideout/.virtualenvs/pycogent/pycogent/cogent/util/unit_test.py", line 316, in failUnlessEqual
    (msg or 'Got %s, but expected %s' % (`observed`, `expected`))
AssertionError: Got ['>Cluster0;size=326', 'AACCCCCACGGTGGATGCCACACGCCCCATACAAAGGGTAGGATGCTTAAGACACATCGCGTCAGGTTTGTGTCAGGCCT', 'AACCCCCACGGTGGATGCCACACGCCCCATACAAAGGGTAGGATGCTTAAGACACATCGCGTCAGGTTTGTGTCAGGCCT'], but expected ['>Cluster0;size=2', 'AACCCCCACGGTGGATGCCACACGCCCCATACAAAGGGTAGGATGCTTAAGACACATCGCGTCAGGTTTGTGTCAGGCCT', 'AACCCCCACGGTGGATGCCACACGCCCCATACAAAGGGTAGGATGCTTAAGACACATCGCGTCAGGTTTGTGTCAGGCCT']

----------------------------------------------------------------------
Ran 29 tests in 4.292s

FAILED (failures=1)

How to get a region of genome from ensembl?

Sorry if this is not the right place to post this question. It is related to the documentation of the package.

Given a location of the human genome (e.g. Chr17, nucleotide number 79477190), would there be a way to retrieve a region of the genome surrounding it?

I know getRegion is perhaps the right command but I'm not quite sure about the parameters (see below)
getRegion(self, region=None, CoordName=None, Start=None, End=None, Strand=None, ensembl_coord=False)

Which flag specifies chromosome number? And does Start and End specify the the start and end of region that will be retrieved? I'm most grateful if somebody could explaine those parameters to me.

Thanks in advance for any information!

pycogent.org domain expired

When trying to find more information on pycogent I get

NOTICE: This domain name expired on 11/18/2013 and is pending renewal or deletion.

Why isn't Windows supported?

Hello,
why isn't windows official supported. Because it isn't tested there or are special things well known that they won't work?

finswimmer

Exception in DenseAligment __init__ method

Hi,

I'm novice user of QIIME, which is using pycogent version 1.5.3, and I get an exception in DenseAlignment init(). After starting up the debugger the error is with the type conversion:

p( type(self.SeqData.astype(self.Alphabet.ArrayType)) )
*** ValueError: ValueError('setting an array element with a sequence.',)

Looking at self.SeqData, it is a numpy.ndarray containing lists:
(Pdb) p(type(self.SeqData[0]))
<type 'list'>

The type to convert to is
(Pdb) p(self.Alphabet.ArrayType)
<type 'numpy.uint8'>

So it seems reasonable that numpy would throw an error when trying to convert a list into a byte. I looked at some of QIIME's align seq tests, and SeqData[0] in those tests was a <type 'numpy.ndarray'>, and SeqData was a 2D array.

Any thoughts on why SeqData is an array of lists? Is this something pycogent normally does? Is it getting confused somewhere along the line? Perhaps QIIME is not passing some extra information, but what would it be? Thanks for you help.

For reference, here's my stack trace:
/usr/lib/python2.7/pdb.py(1314)main()
-> pdb._runscript(mainpyfile)
/usr/lib/python2.7/pdb.py(1233)_runscript()
-> self.run(statement)
/usr/lib/python2.7/bdb.py(387)run()
-> exec cmd in globals, locals
(1)()
/home/krcurtis/microbiome_software/packages/qiime-1.6.0/scripts/align_seqs.py(3)()
-> from future import division
/home/krcurtis/microbiome_software/packages/qiime-1.6.0/scripts/align_seqs.py(188)main()
-> log_path=log_path,failure_path=failure_path)
/home/krcurtis/lib/python2.7/site-packages/qiime/align_seqs.py(240)call()
-> aligned=DenseAlignment)
/home/krcurtis/lib/python2.7/site-packages/cogent/init.py(108)LoadSeqs()
-> label_to_name=label_to_name, **constructor_kw)

/home/krcurtis/lib/python2.7/site-packages/cogent/core/alignment.py(1959)init()
-> self.SeqData.astype(self.Alphabet.ArrayType))

unable to query Ensembl

I tried to set up a host using the following command:
from cogent.db.ensembl import HostAccount

and I received the following error:
this is MySQLdb version (1, 2, 4, 'beta', 4), but _mysql is version (1, 2, 5, 'final', 1)

Any thoughts?

Update scripting guidelines documentation

Specifically the script_usage key in the script_info dictionary. Currently the documentation states that this needs to be a list of tuples. It may be improved by saying each tuple must contain exactly three strings, or the script will fail. The first is a title of the usage, the second a description, and the third is the actual command line entry. If one of these is not provided an empty string is still required.

Ported from QIIME's #425, initially created by @johnchase.

Getting Gene by TranscriptId

Hello,
i would like to fetch the gene and transcript-informations belonging to one Ensemble TranscriptId e.g. "ENST00000357654" for BRCA1

How can I realize that?

Thank you for some informations.

fin swimmer

Checking if a CDS is incomplete

I'm fetching some transcripts from Ensembl using PyCogent but I noticed that some of them are annotated as having 'incomplete CDS' on the Ensembl website. Is there any way to get to this information programmatically within PyCogent?

Error Installing PyCogent

Hi Im trying to install Pycogent to use Picrust. I follow all the instructions installing easy_install and pip but when I run the installation produce this, and finish with an error. Someone can help me? :)
Gabriels-MacBook-Pro-2:PyCogent-1.5.3 Gaby$ DONT_USE_PYREX=1 sudo pip install -r cogent-requirements.txt
Downloading/unpacking cogent (from -r cogent-requirements.txt (line 1))
Downloading cogent-1.5.3.tgz (3.4MB): 3.4MB downloaded
Running setup.py (path:/private/tmp/pip_build_root/cogent/setup.py) egg_info for package cogent
No Cython, will compile from .c files

Requirement already satisfied (use --upgrade to upgrade): numpy>=1.3.0 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from -r cogent-requirements.txt (line 2))
Installing collected packages: cogent
Running setup.py install for cogent
No Cython, will compile from .c files
building 'cogent.align._compare' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/private/tmp/pip_build_root/cogent/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c cogent/align/_compare.c -o build/temp.macosx-10.9-intel-2.7/cogent/align/_compare.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/cogent/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-4UzAT4-record/install-record.txt --single-version-externally-managed --compile:
No Cython, will compile from .c files

running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/cogent

copying cogent/init.py -> build/lib.macosx-10.9-intel-2.7/cogent

creating build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/algorithm.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/align.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/dp_calculation.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/indel_model.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/indel_positions.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/pairwise.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/progressive.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/pycompare.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

copying cogent/align/traceback.py -> build/lib.macosx-10.9-intel-2.7/cogent/align

creating build/lib.macosx-10.9-intel-2.7/cogent/align/weights

copying cogent/align/weights/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/align/weights

copying cogent/align/weights/methods.py -> build/lib.macosx-10.9-intel-2.7/cogent/align/weights

copying cogent/align/weights/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/align/weights

creating build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/blast.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/blat.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/bwa.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/carnac.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/cd_hit.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/clearcut.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/clustalw.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/cmfinder.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/comrna.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/consan.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/contrafold.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/cove.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/dialign.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/dotur.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/dynalign.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/fasttree.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/fasttree_v1.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/foldalign.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/formatdb.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/gctmpca.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/guppy.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/ilm.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/infernal.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/knetfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/mafft.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/mfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/mothur.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/msms.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/muscle.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/muscle_v38.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/nupack.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/parameters.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/parsinsert.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/pfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/pknotsrg.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/pplacer.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/raxml.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/raxml_v730.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/rdp_classifier.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/rdp_classifier20.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/rnaalifold.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/rnaforester.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/rnashapes.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/rnaview.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/rtax.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/sfffile.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/sffinfo.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/sfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/stride.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/uclust.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/unafold.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/usearch.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

copying cogent/app/vienna_package.py -> build/lib.macosx-10.9-intel-2.7/cogent/app

creating build/lib.macosx-10.9-intel-2.7/cogent/cluster

copying cogent/cluster/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/cluster

copying cogent/cluster/approximate_mds.py -> build/lib.macosx-10.9-intel-2.7/cogent/cluster

copying cogent/cluster/goodness_of_fit.py -> build/lib.macosx-10.9-intel-2.7/cogent/cluster

copying cogent/cluster/metric_scaling.py -> build/lib.macosx-10.9-intel-2.7/cogent/cluster

copying cogent/cluster/nmds.py -> build/lib.macosx-10.9-intel-2.7/cogent/cluster

copying cogent/cluster/procrustes.py -> build/lib.macosx-10.9-intel-2.7/cogent/cluster

copying cogent/cluster/UPGMA.py -> build/lib.macosx-10.9-intel-2.7/cogent/cluster

creating build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/alignment.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/alphabet.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/annotation.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/bitvector.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/entity.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/genetic_code.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/info.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/location.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/moltype.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/profile.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/sequence.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/tree.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

copying cogent/core/usage.py -> build/lib.macosx-10.9-intel-2.7/cogent/core

creating build/lib.macosx-10.9-intel-2.7/cogent/data

copying cogent/data/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/data

copying cogent/data/energy_params.py -> build/lib.macosx-10.9-intel-2.7/cogent/data

copying cogent/data/ligand_properties.py -> build/lib.macosx-10.9-intel-2.7/cogent/data

copying cogent/data/molecular_weight.py -> build/lib.macosx-10.9-intel-2.7/cogent/data

copying cogent/data/nucleic_properties.py -> build/lib.macosx-10.9-intel-2.7/cogent/data

copying cogent/data/protein_properties.py -> build/lib.macosx-10.9-intel-2.7/cogent/data

creating build/lib.macosx-10.9-intel-2.7/cogent/db

copying cogent/db/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/db

copying cogent/db/ncbi.py -> build/lib.macosx-10.9-intel-2.7/cogent/db

copying cogent/db/pdb.py -> build/lib.macosx-10.9-intel-2.7/cogent/db

copying cogent/db/rfam.py -> build/lib.macosx-10.9-intel-2.7/cogent/db

copying cogent/db/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/db

creating build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/assembly.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/compara.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/database.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/feature_level.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/genome.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/host.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/name.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/region.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/related_region.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/sequence.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/species.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

copying cogent/db/ensembl/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/db/ensembl

creating build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/arrow_rates.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/codon_usage.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/compatibility.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/dendrogram.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/dinuc.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/distribution_plots.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/dotplot.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/fancy_arrow.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/legend.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/linear.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/multivariate_plot.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/rlg2mpl.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

copying cogent/draw/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/draw

creating build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/best_likelihood.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/bootstrap.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/coevolution.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/discrete_markov.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/likelihood_calculation.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/likelihood_function.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/likelihood_tree.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/models.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/motif_prob_model.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/pairwise_distance.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/parameter_controller.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/predicate.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/simulate.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/solved_models.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/substitution_calculation.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

copying cogent/evolve/substitution_model.py -> build/lib.macosx-10.9-intel-2.7/cogent/evolve

creating build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/alignment.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/bedgraph.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/clustal.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/fasta.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/mage.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/motif.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/nexus.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/pdb.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/pdb_color.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/phylip.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/rna_struct.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/stockholm.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/structure.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/table.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/text_tree.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

copying cogent/format/xyzrn.py -> build/lib.macosx-10.9-intel-2.7/cogent/format

creating build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/distance_transform.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/fit_function.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/function_optimisation.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/geometry.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/markov.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/matrix_exponentiation.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/matrix_logarithm.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/optimisers.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/period.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/scipy_optimisers.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/scipy_optimize.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/simannealingoptimiser.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/solve.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

copying cogent/maths/svd.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths

creating build/lib.macosx-10.9-intel-2.7/cogent/maths/matrix

copying cogent/maths/matrix/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/matrix

copying cogent/maths/matrix/distance.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/matrix

creating build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/alpha_diversity.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/distribution.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/histogram.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/information_criteria.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/jackknife.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/kendall.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/ks.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/period.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/rarefaction.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/special.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/test.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

copying cogent/maths/stats/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats

creating build/lib.macosx-10.9-intel-2.7/cogent/maths/stats/cai

copying cogent/maths/stats/cai/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats/cai

copying cogent/maths/stats/cai/adaptor.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats/cai

copying cogent/maths/stats/cai/get_by_cai.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats/cai

copying cogent/maths/stats/cai/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/stats/cai

creating build/lib.macosx-10.9-intel-2.7/cogent/maths/unifrac

copying cogent/maths/unifrac/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/unifrac

copying cogent/maths/unifrac/fast_tree.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/unifrac

copying cogent/maths/unifrac/fast_unifrac.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/unifrac

creating build/lib.macosx-10.9-intel-2.7/cogent/maths/spatial

copying cogent/maths/spatial/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/maths/spatial

creating build/lib.macosx-10.9-intel-2.7/cogent/motif

copying cogent/motif/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/motif

copying cogent/motif/k_word.py -> build/lib.macosx-10.9-intel-2.7/cogent/motif

copying cogent/motif/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/motif

creating build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/aaindex.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/agilent_microarray.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/binary_sff.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/blast.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/blast_xml.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/bowtie.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/bpseq.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/carnac.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/cigar.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/clustal.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/cmfinder.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/column.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/comrna.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/consan.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/contrafold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/cove.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/ct.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/cut.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/cutg.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/dialign.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/dotur.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/dynalign.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/ebi.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/fasta.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/fastq.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/flowgram.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/flowgram_collection.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/flowgram_parser.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/foldalign.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/gbseq.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/gcg.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/genbank.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/gff.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/gibbs.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/greengenes.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/illumina_sequence.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/ilm.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/infernal.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/kegg_fasta.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/kegg_ko.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/kegg_pos.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/kegg_taxonomy.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/knetfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/locuslink.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/macsim.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/mage.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/meme.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/mfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/mothur.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/msms.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/ncbi_taxonomy.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/newick.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/nexus.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/nupack.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/paml.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/paml_matrix.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/pdb.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/pfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/phylip.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/pknotsrg.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/psl.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rdb.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/record.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/record_finder.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rfam.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rna_fold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rna_plot.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rnaalifold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rnaforester.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rnashapes.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/rnaview.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/sequence.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/sfold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/sprinzl.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/stockholm.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/stride.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/structure.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/table.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/tinyseq.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/tree.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/tree_xml.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/unafold.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

copying cogent/parse/unigene.py -> build/lib.macosx-10.9-intel-2.7/cogent/parse

creating build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/consensus.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/distance.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/least_squares.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/maximum_likelihood.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/nj.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/tree_collection.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/tree_space.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

copying cogent/phylo/util.py -> build/lib.macosx-10.9-intel-2.7/cogent/phylo

creating build/lib.macosx-10.9-intel-2.7/cogent/recalculation

copying cogent/recalculation/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/recalculation

copying cogent/recalculation/calculation.py -> build/lib.macosx-10.9-intel-2.7/cogent/recalculation

copying cogent/recalculation/definition.py -> build/lib.macosx-10.9-intel-2.7/cogent/recalculation

copying cogent/recalculation/scope.py -> build/lib.macosx-10.9-intel-2.7/cogent/recalculation

copying cogent/recalculation/setting.py -> build/lib.macosx-10.9-intel-2.7/cogent/recalculation

creating build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/analysis.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/birth_death.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/markov.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/microarray.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/microarray_normalize.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/randomization.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/searchpath.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/sequence_generators.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/tree.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

copying cogent/seqsim/usage.py -> build/lib.macosx-10.9-intel-2.7/cogent/seqsim

creating build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/annotation.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/asa.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/contact.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/dihedral.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/knots.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/manipulation.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/pairs_util.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/rna2d.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

copying cogent/struct/selection.py -> build/lib.macosx-10.9-intel-2.7/cogent/struct

creating build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/init.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/array.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/checkpointing.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/datatypes.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/dict2d.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/dict_array.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/misc.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/modules.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/option_parsing.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/organizer.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/parallel.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/progress_display.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/recode_alignment.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/table.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/terminal.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/transform.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/trie.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/unit_test.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/update_version.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

copying cogent/util/warning.py -> build/lib.macosx-10.9-intel-2.7/cogent/util

running build_ext

building 'cogent.align._compare' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/cogent

creating build/temp.macosx-10.9-intel-2.7/cogent/align

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/private/tmp/pip_build_root/cogent/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c cogent/align/_compare.c -o build/temp.macosx-10.9-intel-2.7/cogent/align/_compare.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/cogent/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-4UzAT4-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/cogent
Storing debug log for failure in /Users/Gaby/Library/Logs/pip.log
Gabriels-MacBook-Pro-2:PyCogent-1.5.3 Gaby$

uclust application controller does not properly report out of memory errors

See below, the traceback indicates a mismatch in version while the error itself is OOM.

bash-4.1$ cat POTU_zzB2_0.e269325
Traceback (most recent call last):
File "/Users/antoniog/bin/qiime/scripts/pick_otus.py", line 771, in
main()
File "/Users/antoniog/bin/qiime/scripts/pick_otus.py", line 730, in main
failure_path=failure_path)
File "/Users/antoniog/bin/qiime/qiime/pick_otus.py", line 1502, in call
HALT_EXEC=HALT_EXEC)
File "/Users/antoniog/bin/qiimeSoftware/pycogent-1.5.3-release/lib/python2.7/site-packages/cogent/app/uclust.py", line 550, in get_clusters_from_fasta_filepath
raise ApplicationError, ('Error running uclust. Possible causes are '
cogent.app.util.ApplicationError: Error running uclust. Possible causes are unsupported version (current supported version is v1.2.22) is installed or improperly formatted input file was provided
mv: cannot stat ucrC/uclust_ref_picked_otus/POTU_zzB2_/POTU_zzB2_.0_otus.log': No such file or directory mv: cannot statucrC/uclust_ref_picked_otus/POTU_zzB2_/POTU_zzB2_.0_otus.txt': No such file or directory
mv: cannot stat `ucrC/uclust_ref_picked_otus/POTU_zzB2_/POTU_zzB2_.0_failures.txt': No such file or directory

bash-4.1$ head tmpmPWVgbgEwgNq3Z0ygRhg.txt
uclust v1.2.22q
(C) Copyright 2009-10 Robert C. Edgar
Licensed ONLY for use in PyNAST and QIIME.
02:37 8.3Gb 100.0% Reading lib, 18190 seeds
02:37 8.2Gb 0.0%
Out of memory mymalloc(1032822), curr 8.59e+09 bytes
---Fatal error---
Out of memory, mymalloc(1032822), curr 8.59e+09 bytes

uclust --maxrejects 500 --input /scratch/antoniog/tmp/UclustExactMatchFilterioADRhQpsPGhSWdod4Bt.fasta --id 0.97 --w 12 --stepwords 20 --usersort --maxaccepts 20 --libonly --stable_sort --lib /scratch/antoniog/nomic/dbs/interest.fna --uc ucrC/uclust_ref_picked_otus/POTU_zzB2_/POTU_zzB2_1_clusters.uc

NCBI database tests fail

Using the latest development version of PyCogent, the test_db/test_ncbi.py unit tests fail on Mac OS X 10.7.5 and Ubuntu 11.10. I tested using both Python 2.7.1 and 2.7.3.

Note that to see these failures when running ./run_tests, you'll need TEST_DB=1 set.

Here's the output of the unit tests:

======================================================================
FAIL: test_get_unique_lineages (test_db.test_ncbi.NcbiTests)
get_unique_lineages should return all lineages from a query
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jrideout/.virtualenvs/pycogent/pycogent/tests/test_db/test_ncbi.py", line 236, in test_get_unique_lineages
    assert tuple(self.mouse_taxonomy) in result
AssertionError

======================================================================
FAIL: test_taxon_ids_to_lineages (test_db.test_ncbi.NcbiTests)
taxon_ids_to_lineages should return lineages from taxon ids
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jrideout/.virtualenvs/pycogent/pycogent/tests/test_db/test_ncbi.py", line 209, in test_taxon_ids_to_lineages
    self.assertEqualItems(list(taxon_ids_to_lineages(taxon_ids)), result)
  File "/Users/jrideout/.virtualenvs/pycogent/pycogent/cogent/util/unit_test.py", line 354, in assertEqualItems
    % (obs, exp, index))
AssertionError: Observed ['cellular organisms', 'Eukaryota', 'Opisthokonta', 'Metazoa', 'Eumetazoa', 'Bilateria', 'Deuterostomia', 'Chordata', 'Craniata', 'Vertebrata', 'Gnathostomata', 'Teleostomi', 'Euteleostomi', 'Sarcopterygii', 'Tetrapoda', 'Amniota', 'Mammalia', 'Theria', 'Eutheria', 'Euarchontoglires', 'Glires', 'Rodentia', 'Sciurognathi', 'Muroidea', 'Muridae', 'Murinae', 'Mus', 'Mus'] and expected ['cellular organisms', 'Eukaryota', 'Opisthokonta', 'Metazoa', 'Eumetazoa', 'Bilateria', 'Coelomata', 'Deuterostomia', 'Chordata', 'Craniata', 'Vertebrata', 'Gnathostomata', 'Teleostomi', 'Euteleostomi', 'Sarcopterygii', 'Tetrapoda', 'Amniota', 'Mammalia', 'Theria', 'Eutheria', 'Euarchontoglires', 'Glires', 'Rodentia', 'Sciurognathi', 'Muroidea', 'Muridae', 'Murinae', 'Mus', 'Mus'] at sorted index 0

======================================================================
FAIL: test_taxon_ids_to_names_and_lineages (test_db.test_ncbi.NcbiTests)
taxon_ids_to_names should return names/lineages from taxon ids
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jrideout/.virtualenvs/pycogent/pycogent/tests/test_db/test_ncbi.py", line 230, in test_taxon_ids_to_names_and_lineages
    self.assertEqualItems(obs, exp)
  File "/Users/jrideout/.virtualenvs/pycogent/pycogent/cogent/util/unit_test.py", line 354, in assertEqualItems
    % (obs, exp, index))
AssertionError: Observed ('10090', 'Mus musculus', 'cellular organisms; Eukaryota; Opisthokonta; Metazoa; Eumetazoa; Bilateria; Deuterostomia; Chordata; Craniata; Vertebrata; Gnathostomata; Teleostomi; Euteleostomi; Sarcopterygii; Tetrapoda; Amniota; Mammalia; Theria; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Muridae; Murinae; Mus; Mus') and expected ('10090', 'Mus musculus', 'cellular organisms; Eukaryota; Opisthokonta; Metazoa; Eumetazoa; Bilateria; Coelomata; Deuterostomia; Chordata; Craniata; Vertebrata; Gnathostomata; Teleostomi; Euteleostomi; Sarcopterygii; Tetrapoda; Amniota; Mammalia; Theria; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Muridae; Murinae; Mus; Mus') at sorted index 0

----------------------------------------------------------------------
Ran 3941 tests in 218.503s

FAILED (failures=3)

update docs to point to GitHub rather than Sourceforge

From @GavinHuttley by email:

We need to modify the displayed docs http://pycogent.org/#contacts-and-contributing so that bug-reports/forums etc.. point to the correct places on github. Same for the developer page. More generally we need to purge all references to sourceforge, updating them to be github counterparts.

NOTE: this purging needs to be done in the actual rst docs in the repo, so that when we build docs for the next release etc ... we don't have to revisit this.

pip install cogent doesn't work when numpy isn't installed

because setup.py imports from numpy, pip install cogent doesn't work if numpy is not installed (it should install numpy and cogent). this is annoying, because a pip install-able package which depends on PyCogent (pynast) would have to be pip installed in two steps:

pip install numpy pip install pynast

where the second step would install cogent and pynast.

cogent.parse.binary_sff cannot convert gzipped Titanium 454 reads to FLX

This issue arose when we were trying to process a study in QIIME DB.

$process_sff.py -i 454Reads.B-4.sff.gz -f -o processed_data_454Reads.B-4_/ -tTraceback (most recent call last):
File "/Users/adro2179/git_repos/qiime/scripts/process_sff.py", line 83, in
main()
File "/Users/adro2179/git_repos/qiime/scripts/process_sff.py", line 80, in main
no_trim=opts.no_trim)
File "/Users/adro2179/git_repos/qiime/qiime/process_sff.py", line 270, in prep_sffs_in_dir
convert_Ti_to_FLX(sff_fp, sff_flx_fp, use_sfftools)
File "/Users/adro2179/git_repos/qiime/qiime/process_sff.py", line 186, in convert_Ti_to_FLX
True), 100)
File "/Users/adro2179/git_repos/qiime_software/PyCogent-1.5.3/cogent/parse/binary_sff.py", line 358, in parse_binary_sff
validate_common_header(header)
File "/Users/adro2179/git_repos/qiime_software/PyCogent-1.5.3/cogent/parse/binary_sff.py", line 156, in validate_common_header
attr_name, expected_value, observed_value))
cogent.parse.binary_sff.UnsupportedSffError: magic_number not supported. (Expected 779314790, observed 875902034)

BLAT app controller doesn't report out-of-memory errors

This issue was first reported on the QIIME issue tracker here. The BLAT application controller doesn't report an error if you run out of memory, but if you run the blat command directly, it correctly reports the issue. Please see the QIIME issue for more details.

Fetching IDs with unknown species from Ensembl

I was wondering if there's a PyCogent equivalent of get_species_and_object_type() in the Ensembl Perl API? I would like to fetch sequences for Ensembl IDs where I don't know what species a given ID comes from. As far as I can see, querying with cogent.db.ensembl requires creating a Genome object for a specific organism, and the Compara instances are also accessed as compara.SpeciesName. Is there a species-agnostic way of performing queries?

Core db doesn't exist for 'Mustela putorius furo'

I'm trying to fetch some sequences for ferret genes:

from cogent.db.ensembl import Genome, Species
Species.amendSpecies('Mustela putorius furo', 'Ferret')
ferret = Genome(Species='ferret', Release=71)
ferret.getGeneByStableId(StableId="ENSMPUG00000000068")

but I'm getting a "RuntimeError: core db doesn't exist for 'Mustela putorius furo' on 'ensembldb.ensembl.org'" error message.

I implemented the same in Perl and it seems to work fine:

use Bio::EnsEMBL::Registry;

my $registry = 'Bio::EnsEMBL::Registry';

$registry->load_registry_from_db(
    -host => 'ensembldb.ensembl.org',
    -user => 'anonymous'
    );

my $gene_adaptor  = $registry->get_adaptor( 'ferret', 'Core', 'Gene' );
$gene = $gene_adaptor->fetch_by_stable_id('ENSMPUG00000000068');

Missing Gene-Symbol using transcript.Gene.Symbol

How I mentioned in another issues the gene-symbol is missing if I try getting it with in Transcript-object.

You can reproduce it, by getting a Transcript with getTranscriptByStabelId or getGeneMatchingStableId and then select a Transcript. If I then want to print out the Symbol by Transcript.Gene.Symbol there is no value

import os
Release = 70
from cogent.db.ensembl import HostAccount
from cogent.db.ensembl import Species
from cogent.db.ensembl import Genome
import sqlalchemy as sql

if 'ENSEMBL_ACCOUNT' in os.environ:
    host, username, password = os.environ['ENSEMBL_ACCOUNT'].split()
    account = HostAccount(host, username, password)
else:
    account = None

human = Genome(Species='human', Release=Release, account=account)

t = human.getTranscriptByStableId('ENST00000003084')
print t.Gene.Symbol

g = human.getGeneByStableId('ENSG00000001626')
print g.Transcript[0].Gene.Symbol

If my researches are correct the problem is an the method _get_gene in the Transcript-class

def _get_gene(self):
        gene_id = self.gene_id
        gene_table = self.db.getTable('gene')
        query = sql.select([gene_table], gene_table.c.gene_id == gene_id)
        record = asserted_one(query.execute())
        gene = Gene(self.genome, self.db, data=record)
        return gene

The select-statement doesn't include the symbol which seems to be in a xref-table.

Am I right? But until now i don't understand the code enough to find a fix.

fin swimmer

table*.flanking_sequence do not exist

Hello,
I am trying to reproduce the code form the Querying Ensembl doc page:
the following code:

brca2_snps = human.getFeatures(feature_types='variation',region=brca2)
for snp in brca2_snps:
     if 'non_synonymous_codon' in snp.Effect:
         break
print snp

produces this error (among others ):

ProgrammingError: (ProgrammingError) (1146, "Table 'homo_sapiens_variation_70_37.flanking_sequence' doesn't exist") 'DESCRIBE flanking_sequence' ()

Do you want me to send you all errors?

my set-up:
python Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
pycogent build form the github source
mac os 10.7.5

Thanks for your help and pycogent !
yvan

logical error in CommandLineApplication.getTmpFilename?

This method has an argument tmp_dir whose default value is "/tmp". The class attribute TmpDir has the same default. Internal to this method is the following code.

        # check not none
        if not tmp_dir:
            tmp_dir = self.TmpDir

It seems to me that a user might construct the class instance, specifying a different value to TmpDir but it would never be used. I suggest leave definition of defaults to class args, make the method argument default None.

Looking for a SNP on a certain position

Hello,
I don't know if there is already in easy way and if not whether someone have an idea how to realize it:

If I have a transcript e.g. ENST00000393691 (BRCA1) i would like to check wether there is an entry in dbSNP for a certain position.

The goal is to map a primer and fulfill a SNP-Check on these position.

Thanks for your ideas.

fin swimmer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.