While Genomedata archives can be created without any tracks (1e0bf78f9f9186908e92134239a9f4e0a4ca2345), attempting to access any track-related attributes for such archives fails with a somewhat cryptic error, instead of (ideally) returning empty attributes or a clear error message.
Attempting to access track attributes, via either the command-line interface or Python API, fails, eventually resulting in an error in the __getattr__ method of tables/attributeset.py:
"'%s'" % (name, self._v__nodepath))
AttributeError: Attribute 'tracknames' does not exist in node: '/'
This error can be easily reproduced by invoking genomedata-info tracknames <archive>, while genomedata-info sizes <archive> results in the expected output. This also occurs with other track-dependent attributes, such as num_tracks_continuous or vars, accessible from the Python API.
This appears to occur due to Genomedata archives without tracks not having any track-dependent attributes, like num_tracks_continuous. Refer to the enclosed file, containing Python output, listing all attributes of a loaded Genomedata archive without any tracks (the result of
pprint(genome.__dict__), in which genome = Genome(<archive>).
Ideally, such archives should still contain all track-related attributes, initialized to their standard empty values, such as num_tracks_continuous = 0 and vars = np.array([]).
Original report (archived issue) by Coby Viner (Bitbucket: cviner2, GitHub: cviner).
The original report had attachments: genome_attrs.log
While Genomedata archives can be created without any tracks (1e0bf78f9f9186908e92134239a9f4e0a4ca2345), attempting to access any track-related attributes for such archives fails with a somewhat cryptic error, instead of (ideally) returning empty attributes or a clear error message.
Attempting to access track attributes, via either the command-line interface or Python API, fails, eventually resulting in an error in the
__getattr__
method oftables/attributeset.py
:This error can be easily reproduced by invoking
genomedata-info tracknames <archive>
, whilegenomedata-info sizes <archive>
results in the expected output. This also occurs with other track-dependent attributes, such asnum_tracks_continuous
orvars
, accessible from the Python API.This appears to occur due to Genomedata archives without tracks not having any track-dependent attributes, like
num_tracks_continuous
. Refer to the enclosed file, containing Python output, listing all attributes of a loaded Genomedata archive without any tracks (the result ofpprint(genome.__dict__)
, in whichgenome = Genome(<archive>)
.Ideally, such archives should still contain all track-related attributes, initialized to their standard empty values, such as
num_tracks_continuous = 0
andvars = np.array([])
.