cDNA_Cupcake
cDNA_Cupcake copied to clipboard
Bugs in annotation/rarefaction scripts
Hello-
I just wanted to make a note of two slight bugs I found while doing rarefaction analysis:
-
The script make_file_for_subsampling_from_collapsed.py doesn't work when the --include_single_exons flag is included because of the "or" statement on line 77. The line is: r['pbid'] in good_ids or include_single_exons: If --include_single_exons is used, good_ids is not initialized, and since that's the first part of the "or" statement, the program then kills. I got it to work by changing the statement to: if include_single_exons:
-
On the tutorial page, it is mentioned that the default for --min_fl_count in the script subsample.py is 1, but I see min_fl_count=2 listed as a parameter for the functions get_counts() and subsample() within the script.
Thanks! Alissa
Thanks for posting this! It really sped up my troubleshooting. I've found that swapping the order of the or statement is also a good solution: if include_single_exons or r['pbid'] in good_ids:
This works because if the first part of the "or" statement evaluates to true, python won't even try to evaluate the second part.