databio / pepatac

A modular, containerized pipeline for ATAC-seq data processing
http://pepatac.databio.org
BSD 2-Clause "Simplified" License
54 stars 15 forks source link

refgenconf object type is changed by attmap #129

Closed nsheff closed 4 years ago

nsheff commented 4 years ago

When you try to stick a refgenconf object in as an attribute of an attmap, it's losing its status as a refgenconf object.

nsheff commented 4 years ago

this is a hack workaround --we don't use it as an attribute in attmap.

But there's a bigger-picture problem here that needs to be fixed, probably in attmap.

stolarczyk commented 4 years ago

it looks like it does not change its class in an interactive session:

In [1]: from attmap import AttMap                                                                                                                                                                         

In [2]: from refgenconf import RefGenConf                                                                                                                                                                 

In [3]: rgc = RefGenConf()                                                                                                                                                                                

In [4]: rgc                                                                                                                                                                                               
Out[4]: 
RefGenConf
genomes: OrderedDict()
genome_folder: /Users/mstolarczyk/Uczelnia/UVA/code/bbconf
config_version: 0.3
genome_servers: ['http://refgenomes.databio.org']

In [5]: a=AttMap()                                                                                                                                                                                        

In [6]: a                                                                                                                                                                                                 
Out[6]: AttMap: {}

In [7]: rgc                                                                                                                                                                                               
Out[7]: 
RefGenConf
genomes: OrderedDict()
genome_folder: /Users/mstolarczyk/Uczelnia/UVA/code/bbconf
config_version: 0.3
genome_servers: ['http://refgenomes.databio.org']

In [8]: a.rgc = rgc                                                                                                                                                                                       

In [9]: a.rgc                                                                                                                                                                                             
Out[9]: 
RefGenConf
genomes: OrderedDict()
genome_folder: /Users/mstolarczyk/Uczelnia/UVA/code/bbconf
config_version: 0.3
genome_servers: ['http://refgenomes.databio.org']

In [10]: type(a.rgc)                                                                                                                                                                                      
Out[10]: refgenconf.refgenconf.RefGenConf

In [11]: a.rgc.get_asset()                                                                                                                                                                                
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-11-da00833c2cbf> in <module>
----> 1 a.rgc.get_asset()

TypeError: get_asset() missing 2 required positional arguments: 'genome_name' and 'asset_name'
jpsmith5 commented 4 years ago

Obtaining assets is changed at this point, so I don't believe this is relevant to this pipeline anymore. But happy to reopen if necessary.