Update and expand tutorials against real ENCODE data - #51
Merged
Conversation
The zYe7g6qnyxGDxRd Nextcloud share is no longer live; Mf2zMePGBzFWFk8 is the current working link for the same TutorialsData.zip archive. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The transcript-context filter variable is trid, not transcript_id. Using transcript_id silently defaults to None, and gene.coverage[:,None] triggers numpy newaxis broadcasting that crashes any()/all() calls on the resulting 2D array -- exactly the ValueError reported in #19. Also corrects 06_filtering.ipynb's cached output, stale since trid was renamed from transcript_id in the library.
The code cell already calls transcript_table(cpm=True); only the cached DataFrame output still showed sum_tpm from before the 2.1.0 tpm->cpm rename. Values are unchanged (cpm was always the correct formula), so only the label needed correcting.
…orial The .tbi index was required for the reference annotation; that requirement was removed for #28 back in 2.0.3 (plain sequential gzip reading, no TabixFile). Also documents infer_genes=True for gtf/gff3 files without explicit gene entries, which may happen when importing files from external tools.
…rials Adds consistent logging setup (matching 03/03b's existing pattern) to 04/05/06/08/09/10, which previously had none -- their warnings were falling through Python's bare last-resort handler with no level prefix. All 8 notebooks now filter the repetitive "gene name/id ... is ambiguous" warnings from make_index(), and progress_bar=False is set on from_reference/add_sample_from_bam/add_qc_metrics/ add_orf_prediction in 03/03b to avoid multi-line tqdm spam in cached output. 02_api_vs_cli.ipynb's CLI calls filter the same warnings via grep -v.
New notebook 07_gene_model_characteristics.ipynb covers gene/transcript access, str_var_calculation/triangle_plot, entropy_calculation, and gene_track(colorbySqanti=True) -- previously uncovered by any tutorial.
Add importing SQANTI classification file function into 05_qc.ipynb.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
find_splice_bubbles.tridfilter bug (Using the demonstration_data, gives error: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #19), and other stale claims (.tbirequirement,tpm->cpmlabels).colorbySqanti), a QC metric distribution section, SQANTI3 classification import, and an expanded splicing coordination example.SQANTI_PALETTEextracted as a shared constant, GM12878/K562 coloring standardized across notebooks, Conclusion sections added, logo resized,quickstart.rstfixes.Test plan
black --checkandflake8clean