You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run the .get_raw_coverage_table attribute from the documentation, I get the following error:
Type "help", "copyright", "credits" or "license" for more information.
>>> import inStrain
>>> import inStrain.SNVprofile
>>> IS=inStrain.SNVprofile.SNVprofile("results/CAPIIB.IS/")
>>> coverage_table = IS.get_raw_coverage_table()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'SNVprofile' object has no attribute 'get_raw_coverage_table'
I looked in the SNVprofile.py script and couldn't find that attribute defined. The .get_nonredundant_scaffold_table method worked when I tried that.
The text was updated successfully, but these errors were encountered:
I just looked into that and you are indeed correct, this method seems to have been deprecated several inStrain versions ago. I will add back this method in a more sensical way soon.
In the meantime you can access the raw coverage values by running IS.get('covT'). This will return a covT object, which is a goofy object that consists of a series of nested dictionaries. I can go into detail if you'd like, but if you'd just like an array of coverage values, you can run cov = inStrain.profile.profile_utilities.mm_counts_to_counts_shrunk(covT[scaff]) on your covT object, where scaff is the name of the scaffold you'd like the coverage for. This will return a pandas Series object where the index is the position on the scaffold (0-based), and the value is the coverage at that base. Positions with no coverage will not be in this object.
Hope that helps and sorry for the out-of-date docs!
When trying to run the
.get_raw_coverage_table
attribute from the documentation, I get the following error:I looked in the SNVprofile.py script and couldn't find that attribute defined. The
.get_nonredundant_scaffold_table
method worked when I tried that.The text was updated successfully, but these errors were encountered: