Mercurial > repos > artbio > gsc_filter_cells
changeset 1:02fdb062c175 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc-filter_cells commit e4aa2be8f78682bbd8c3f94ff05aeeca47bb5b5f
author | artbio |
---|---|
date | Wed, 19 Jun 2019 10:14:49 -0400 |
parents | 444f58c5ea03 |
children | be2b5d74fb0b |
files | filter_cells.R filter_cells.xml test-data/absolute_counts-only.pdf test-data/absolute_gene-and-counts.pdf test-data/absolute_gene-only.pdf test-data/intersect_percentile_gene-and-counts.pdf test-data/no-filtering.pdf test-data/percentile_counts-only.pdf test-data/percentile_gene-and-counts.pdf test-data/percentile_gene-only.pdf |
diffstat | 10 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/filter_cells.R Sun Jun 16 11:23:16 2019 -0400 +++ b/filter_cells.R Wed Jun 19 10:14:49 2019 -0400 @@ -141,7 +141,7 @@ ## Plot the results # Determine title from the parameter logics -if(opt$percentile_counts > 0){ +if (opt$percentile_counts > 0){ part_one = paste0("Cells with aligned reads counts below the ", opt$percentile_counts, "th percentile of aligned read counts")} else { @@ -150,12 +150,16 @@ } if(opt$percentile_genes > 0){ - part_two = paste0("cells with number of detected genes below the ", + part_two = paste0("with number of detected genes below the ", opt$percentile_genes, "th percentile of detected gene counts")} else { - part_two = paste0("cells with number of detected genes below ", + part_two = paste0("with number of detected genes below ", opt$absolute_genes) } +if (opt$manage_cutoffs == "intersect") { + conjunction = " and\n" } else { + conjunction = " or\n" +} # plot with ggplot2 ggplot(QC_metrics, aes(nGenes, total_counts, colour = filtered)) + @@ -166,7 +170,7 @@ paste0("Filtered (", table(QC_metrics$filtered)[2], " cells)"))) + xlab("Detected genes per cell") + ylab("Aligned reads per cell (log10 scale)") + geom_vline(xintercept = genes_threshold) + geom_hline(yintercept = counts_threshold) + - ggtitle( paste0(part_one, " and\n", part_two, "\nwere filtered out")) + + ggtitle( paste0(part_one, conjunction, part_two, "\nwere filtered out")) + theme(plot.title = element_text(size = 8, face = "bold")) dev.off()
--- a/filter_cells.xml Sun Jun 16 11:23:16 2019 -0400 +++ b/filter_cells.xml Wed Jun 19 10:14:49 2019 -0400 @@ -1,4 +1,4 @@ -<tool id="filter_cells" name="Filter cells data" version="0.4.0"> +<tool id="filter_cells" name="Filter cells data" version="0.4.1"> <description>on total aligned reads and/or number of detected genes</description> <requirements> <requirement type="package" version="1.3.2=r3.3.2_0">r-optparse</requirement> @@ -45,7 +45,7 @@ <param name="absolute_counts" value="0" type="integer" label="Absolute number of aligned read Threshold [integer]" help="Cells with number of aligned reads below this absolute threshold will be filtered out. Leave at 0 for no filtering" /> <param name="manage_cutoffs" type="select" label=" filter out intersection or union of cutoffs" - help="If you use two cutoffs on number of detected genes and number of aligned reads, respectively, their is two option + help="If you use two cutoffs on number of detected genes and number of aligned reads, respectively, their is two options for using these cutoffs in filtering: either excluding items that are below one or the other threshold (union) or excluding items that are below both thresholds (intersection)" > <option value="union" selected="true">Union of cutoffs</option> @@ -77,7 +77,7 @@ <output name="output" file="intersect_percentile_gene-and-counts.tab" ftype="tabular"/> <output name="output_metada" file="intersect_percentile_gene-and-counts.meta" ftype="tabular"/> </test> - <test> + <test> <param name="input" value="input.tsv" ftype="txt"/> <param name="sep" value='tab' /> <param name="percentile_genes" value="20"/>