sjteresi / TE_Density

Python script calculating transposable element density for all genes in a genome. Publication: https://mobilednajournal.biomedcentral.com/articles/10.1186/s13100-022-00264-4
GNU General Public License v3.0
28 stars 4 forks source link

add MergeData test for summation #24

Open teresi opened 4 years ago

teresi commented 4 years ago

MergeData can calculate the sum of overlaps for superfamilies / orders but... currently operates on fake data (real classes but with fake inputs)

MergeData currently has limited tests verifying basic functionality

sjteresi commented 4 years ago

@teresi here are some considerations on the use of yield_fixture in test_MergeData.py

pytest yield_fixture docs yield_fixture is deprecated. Apparently you can do the same thing inside a normal fixture and yield...

sjteresi commented 4 years ago

To start, I am going to create a more detailed mock data for the GeneData and the TransposonData.

I have already made something like GeneData in the normalization_matrices branch, and will do something similar here for the TransposonData as well. I think that would be best to have a small subset of the annotation file that we can easily look at, wrap, and write test values for.

What do you think?

teresi commented 3 years ago

it's been a while but now that you have a real data subset you take the data, there, do a hand calc, and make sure it returns what you expect

as we discussed, the isntance variables superfamily order have the overlaps there are slice functions that can help you access the data in the overlap (see left_right_slice intra_slice)

start with test_MergeData.py merge_sink_real you need to add your real data and then make tests that make sure the summation works