databio / peppro

A modular, containerized pipeline for PRO-seq data processing
http://peppro.databio.org/
BSD 2-Clause "Simplified" License
9 stars 2 forks source link

Setting attmap values doesn't preserve data types #13

Closed nsheff closed 4 years ago

nsheff commented 5 years ago

have you seen this before?

Prealignments (07-30 14:07:57) elapsed: 0.0 TIME

Prealignment assemblies: ['human_rDNA', 'rCRSd'] Traceback (most recent call last): File "pipelines/peppro.py", line 2945, in sys.exit(main()) File "pipelines/peppro.py", line 1715, in main res.rgc.get_asset(reference, BT2_IDX_KEY), reference), TypeError: 'str' object is not callable Pipeline status: running Starting cleanup: 3 files; 4 conditional files for cleanup

jpsmith5 commented 5 years ago

Double check the BT2_IDX_KEY and how you have that listed in your $REFGENIE. That may be related to the bowtie2 asset versus bowtie2_index and how that went back and forth a few times. I vaguely recall seeing an error like that in that instance... where I hadn't updated my config file for one of the prealignment genomes.

nsheff commented 5 years ago

I'm using our global genomes.yaml file... the indexes all look correct for these genomes

jpsmith5 commented 5 years ago

Yeah it's unclear then where this is coming from. I'm actively running samples through right now, and just finished running from scratch the tutorial sample again to confirm things were running correctly. I'll try using the shared genomes.yaml file and see if I get same error here.

nsheff commented 5 years ago

i figured out where it comes from. you must be using an old version of attmap/yacman. this shows up on attmap 0.12.8, but not 0.12.7

jpsmith5 commented 5 years ago

Ah yes:

$ pip show attmap
Name: attmap
Version: 0.12.7
nsheff commented 5 years ago

https://github.com/pepkit/attmap/compare/v0.12.7...v0.12.8

nsheff commented 5 years ago

for some reason with this update, when you set res.rgc = rgc, it's getting converted from a RefGenConf object into an EchoAttMap object, which lacks the get_asset function. so,rgc. get_asset is returning a string, "get_asset", which is not callable; hence the error.

nsheff commented 5 years ago
In [33]: rgc = refgenconf.RefGenConf("/ext/qumulo/genomes/genomes.yaml") 
    ...: eam = attmap.EchoAttMap()  
    ...: eam.rgc = rgc 
    ...: type(rgc)                                                                                      
Out[33]: refgenconf.refgenconf.RefGenConf

In [34]: type(eam.rgc)                                                                                  
Out[34]: attmap.attmap_echo.EchoAttMap

In [35]: eam.rgc.get_asset()                                                                            
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-35-c0040c43753f> in <module>
----> 1 eam.rgc.get_asset()

TypeError: 'str' object is not callable
nsheff commented 5 years ago

This is at least a temporary fix.