tleonardi / nanocompore

RNA modifications detection from Nanopore dRNA-Seq data
https://nanocompore.rna.rocks
GNU General Public License v3.0
80 stars 12 forks source link

Replicates have to be named differently #59

Closed a-slide closed 5 years ago

a-slide commented 5 years ago

You cannot have replicate called the same in the 2 conditions. I assumed it uses only 1 condition if not as it raises 0 variance errors.

Doesn't work

eventalign_fn_dict = {
        'Modified': {'rep1':'./sample_files/modified_rep_1.tsv', 'rep2':'./sample_files/modified_rep_2.tsv'},
        'Unmodified': {'rep1':'./sample_files/unmodified_rep_1.tsv', 'rep2':'./sample_files/unmodified_rep_2.tsv'}}

Works fine

eventalign_fn_dict = {
        'Modified': {'rep1':'./sample_files/modified_rep_1.tsv', 'rep2':'./sample_files/modified_rep_2.tsv'},
        'Unmodified': {'rep3':'./sample_files/unmodified_rep_1.tsv', 'rep4':'./sample_files/unmodified_rep_2.tsv'}}

The problem started after txComp refactor

tleonardi commented 5 years ago

I think this might have been a problem before as well (at least for the Anova test), but I went unnoticed because of the lack of strict... The issue is that the samples are treated independently by most of the code, and the relationship sample->condition is tracked by the dict sample_condition_labels. I think the easiest solution is to force the user to use different names with a check in SampComp. Do you think it's acceptable?

a-slide commented 5 years ago

We could but it is not very elegant. What about renaming replicates by concatenating the condition and replicates names ?

a-slide commented 5 years ago

Fixed in branch doc. https://github.com/tleonardi/nanocompore/commit/152cc6e5c9e8946f74006f353017221d6e4cf3c9 Sample labels are used as a prefix of the rep names if any duplicated replicate names are found