cDNA_Cupcake icon indicating copy to clipboard operation
cDNA_Cupcake copied to clipboard

Bugs in annotation/rarefaction scripts

Open alissawilliams opened this issue 5 years ago • 1 comments

Hello-

I just wanted to make a note of two slight bugs I found while doing rarefaction analysis:

  1. 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:

  2. 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

alissawilliams avatar Feb 14 '20 17:02 alissawilliams

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.

mrendleman avatar Oct 12 '23 13:10 mrendleman