-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scanpy qc plots #312
Open
ajroura22
wants to merge
8
commits into
ebi-gene-expression-group:main
Choose a base branch
from
ajroura22:feature/scanpy_qc_plots
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+633
−0
Open
scanpy qc plots #312
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
72d0df7
First working versions of scanpy qc metrics script
pcm32 54bf7c2
initial commit for the scan qc wrapper
ajroura22 b4b2b8c
testing the xml
ajroura22 c808a19
improved tests
ajroura22 7796e54
Defining data outputs
ajroura22 873197a
Improvements to qc script
pcm32 abddadd
Formatting improvements
pcm32 03f9197
Add categories to shed.yml
pcm32 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0"?> | ||
<tool id="scRNAseq_qc_tool" name="scRNAseq Quality Control Tool" version="1.0.0" hidden="false"> | ||
<description>Generate quality control metrics for single-cell RNA-seq data.</description> | ||
<macros> | ||
<import>scanpy_macros2.xml</import> | ||
</macros> | ||
<expand macro="requirements"/> | ||
<command detect_errors="exit_code"> | ||
<![CDATA[ | ||
#!/bin/bash | ||
python $__tool_directory__/scripts/sc_qc_metrics.py "$adata_file" "$sample_field" | ||
--output_format "$output_format" | ||
--plot_size "$plot_size" | ||
#if $percent_mito_field: | ||
--percent_mito_field '$percent_mito_field' | ||
#end if | ||
#if $percent_ribo_field: | ||
--percent_ribo_field '$percent_ribo_field' | ||
#end if | ||
#if $ribo_field: | ||
--ribo_field '$ribo_field' | ||
#end if | ||
#if $mito_field: | ||
--mito_field '$mito_field' | ||
#end if | ||
#if $doublet_score_field: | ||
--doublet_score_field '$doublet_score_field' | ||
#end if | ||
]]> | ||
</command> | ||
<inputs> | ||
<param type="data" format="h5ad,h5" name="adata_file" label="AnnData object file" /> | ||
<param type="text" name="sample_field" label="Sample Field" /> | ||
<param type="select" name="output_format" label="Output Format"> | ||
<option value="pdf">PDF</option> | ||
<option value="png">PNG</option> | ||
</param> | ||
<param type="text" name="plot_size" label="Plot Size (Width Height)" value="10,10"/> | ||
<param type="text" name="percent_mito_field" label="Mitochondrial Gene Field" /> | ||
<param type="text" name="percent_ribo_field" label="Ribosomal Gene Field" /> | ||
<param type="text" name="ribo_field" label="Ribo Field" /> | ||
<param type="text" name="mito_field" label="Mito Field" /> | ||
<param type="text" name="doublet_score_field" label="Doublet Score Field" /> | ||
</inputs> | ||
<outputs> | ||
<data name="general_qc_plots" format="pdf" label="General QC Plots" from_work_dir="general_qc_plots.pdf" /> | ||
<data name="scatter_umi_vs_genes_detected_colored_by_mito" format="pdf" label="Scatter UMI vs Genes Detected (Colored by Mito)" from_work_dir="scatter_umi_vs_genes_detected_colored_by_mito.pdf" /> | ||
<data name="scatter_umi_vs_genes_detected" format="pdf" label="Scatter UMI vs Genes Detected" from_work_dir="scatter_umi_vs_genes_detected.pdf" /> | ||
<data name="doublet_ratio_plot" format="pdf" label="Doublet Ratio Plot" from_work_dir="doublet_ratio_plot.pdf" /> | ||
<data name="highest_expr_genes" format="pdf" label="Highest Expression Genes Plot" from_work_dir="highest_expr_genes.pdf" /> | ||
<data name="n_counts_per_cell" format="pdf" label="Counts per Cell Plot" from_work_dir="n_counts_per_cell.pdf" /> | ||
<data name="n_counts_per_cell_by_sample" format="pdf" label="Counts per Cell by Sample Plot" from_work_dir="n_counts_per_cell_by_sample.pdf" /> | ||
<data name="n_genes_per_cell" format="pdf" label="Genes per Cell Plot" from_work_dir="n_genes_per_cell.pdf" /> | ||
<data name="percent_mito_per_cell" format="pdf" label="Percent Mitochondrial per Cell Plot" from_work_dir="percent_mito_per_cell.pdf" /> | ||
<collection name="highest_expr_genes_per_sample" type="data" label="highest_expr_genes_${sample}.pdf"> | ||
<discover_datasets pattern="(?P<name>.+)\.tsv$" format="pdf" directory="output_dir" visible="false"/> | ||
</collection> | ||
</data> | ||
</outputs> | ||
|
||
|
||
<tests> | ||
<!-- Test Case 1: Basic Test --> | ||
<test> | ||
<param name="adata_file" value="anndata_ops_raw.h5" /> | ||
<param name="sample_field" value="louvain" /> | ||
<param name="output_format" value="pdf" /> | ||
<output name="general_qc_plots" > | ||
<assert_contents> | ||
<has_size value="100000" delta="1000"/> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
<!-- Add more test cases as needed --> | ||
</tests> | ||
<!-- ... (help section as provided in the previous response) ... --> | ||
|
||
<help> | ||
<![CDATA[ | ||
This tool generates quality control metrics for single-cell RNA-seq data using the provided Python script. | ||
Input parameters: | ||
- AnnData object file: Path to the AnnData object file. | ||
- Sample Field: Field in the obs for the sample identifier. | ||
- Output Format: Output format of the plots (PDF or PNG). | ||
- Plot Size: Size of the plots (optional, provide as "width height"). | ||
- Mitochondrial Gene Field: Field in the obs for the percentage of mitochondrial genes. | ||
- Ribosomal Gene Field: Field in the obs for the percentage of ribosomal genes. | ||
- Ribo Field: Field in the var for marking ribosomal genes. | ||
- Mito Field: Field in the var for marking mitochondrial genes. | ||
- Doublet Score Field: Field in the obs for the doublet score. | ||
Output: | ||
- General QC Plots: PDF file containing general quality control plots. | ||
]]> | ||
</help> | ||
<expand macro="citations"/> | ||
|
||
</tool> | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a
help
field on each, explaining what they are. For example, for Mitochondrial Gene Field: