# HG changeset patch # User artbio # Date 1560953689 14400 # Node ID 02fdb062c1751d62e7314936ca4e839b438e99de # Parent 444f58c5ea0356aa38c0951fb1c359c4f7be0214 planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc-filter_cells commit e4aa2be8f78682bbd8c3f94ff05aeeca47bb5b5f diff -r 444f58c5ea03 -r 02fdb062c175 filter_cells.R --- 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() diff -r 444f58c5ea03 -r 02fdb062c175 filter_cells.xml --- 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 @@ - + on total aligned reads and/or number of detected genes r-optparse @@ -45,7 +45,7 @@ @@ -77,7 +77,7 @@ - + diff -r 444f58c5ea03 -r 02fdb062c175 test-data/absolute_counts-only.pdf Binary file test-data/absolute_counts-only.pdf has changed diff -r 444f58c5ea03 -r 02fdb062c175 test-data/absolute_gene-and-counts.pdf Binary file test-data/absolute_gene-and-counts.pdf has changed diff -r 444f58c5ea03 -r 02fdb062c175 test-data/absolute_gene-only.pdf Binary file test-data/absolute_gene-only.pdf has changed diff -r 444f58c5ea03 -r 02fdb062c175 test-data/intersect_percentile_gene-and-counts.pdf Binary file test-data/intersect_percentile_gene-and-counts.pdf has changed diff -r 444f58c5ea03 -r 02fdb062c175 test-data/no-filtering.pdf Binary file test-data/no-filtering.pdf has changed diff -r 444f58c5ea03 -r 02fdb062c175 test-data/percentile_counts-only.pdf Binary file test-data/percentile_counts-only.pdf has changed diff -r 444f58c5ea03 -r 02fdb062c175 test-data/percentile_gene-and-counts.pdf Binary file test-data/percentile_gene-and-counts.pdf has changed diff -r 444f58c5ea03 -r 02fdb062c175 test-data/percentile_gene-only.pdf Binary file test-data/percentile_gene-only.pdf has changed