google-code-export / segtools

Automatically exported from code.google.com/p/segtools
1 stars 1 forks source link

segtools-nucleotide-frequency prints unfriendly error message when Genomedata archive doesn't have sequence #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Attempted the command

segtools-nucleotide-frequency segway.bed.pkl.gz 
data/encode/commonData/byDataType/signal/jan2011/genomedata.tier1-2

get output:

Loading Annotation from file: segway.bed.pkl.gz
  Unpickling Annotation
Loading finished in 2.1 seconds.
  chr1
    preparing chromosome sequence...
Traceback (most recent call last):
  File "/net/noble/vol1/home/epaul9/arch/Linux/RHEL5/x86_64/bin/segtools-nucleotide-frequency", line 8, in <module>
    load_entry_point('segtools==1.1.10.dev-r374', 'console_scripts', 'segtools-nucleotide-frequency')()
  File "/net/noble/vol1/home/epaul9/arch/Linux/RHEL5/x86_64/lib/python2.7/segtools-1.1.10.dev_r374-py2.7.egg/segtools/nucleotide_frequency.py", line 273, in main
    validate(filename, genomedatadir, outdir, **kwargs)
  File "/net/noble/vol1/home/epaul9/arch/Linux/RHEL5/x86_64/lib/python2.7/segtools-1.1.10.dev_r374-py2.7.egg/segtools/nucleotide_frequency.py", line 224, in validate
    quick=quick, verbose=verbose)
  File "/net/noble/vol1/home/epaul9/arch/Linux/RHEL5/x86_64/lib/python2.7/segtools-1.1.10.dev_r374-py2.7.egg/segtools/nucleotide_frequency.py", line 119, in calc_nucleotide_frequencies
    chrom_sequence = chromosome.seq[0:chromosome.end]
  File "/net/noble/vol1/software/modules-sw/genomedata/1.3.2/Linux/RHEL5/x86_64/lib/python2.7/genomedata/__init__.py", line 1197, in __getitem__
    seq[dest_start:dest_end] = supercontig.seq[sc_start:sc_end]
  File "/net/noble/vol1/software/modules-sw/genomedata/1.3.2/Linux/RHEL5/x86_64/lib/python2.7/genomedata/__init__.py", line 1136, in seq
    return self.h5group.seq
  File "/net/gs/vol3/software/modules-sw/python/2.7/Linux/RHEL5/x86_64/lib/python2.7/site-packages/tables/group.py", line 834, in __getattr__
    return self._f_getChild(name)
  File "/net/gs/vol3/software/modules-sw/python/2.7/Linux/RHEL5/x86_64/lib/python2.7/site-packages/tables/group.py", line 705, in _f_getChild
    self._g_checkHasChild(childname)
  File "/net/gs/vol3/software/modules-sw/python/2.7/Linux/RHEL5/x86_64/lib/python2.7/site-packages/tables/group.py", line 446, in _g_checkHasChild
    % (self._v_pathname, name))
tables.exceptions.NoSuchNodeError: group ``/supercontig_0`` does not have a 
child named ``seq``

output of version:

[epaul9@~]$ segtools-nucleotide-frequency --version
segtools-nucleotide-frequency $Revision: 343 $

The genomedata archive is a directory

Original issue reported on code.google.com by epa...@uw.edu on 11 Sep 2012 at 9:47

GoogleCodeExporter commented 9 years ago
You should recreate the Genomedata archive in question with sequence instead of 
using an AGP file. The error message should be friendlier though.

Original comment by hoffman...@gmail.com on 11 Sep 2012 at 10:07

GoogleCodeExporter commented 9 years ago
As Michael said this issue arises from using Genomedata archives without a 
sequence. I will mark this as closed as it is not strictly a segtools issue.

Original comment by epa...@uw.edu on 13 Sep 2012 at 12:24

GoogleCodeExporter commented 9 years ago
This isn't really a bug but I think the error message should be friendlier so 
I'm reopening it. The error message should describe the real problem and not 
look inexplicable

Original comment by hoffman...@gmail.com on 13 Sep 2012 at 12:28