# HG changeset patch # User azomics # Date 1592861618 14400 # Node ID d2749aa59d20f8cbf0150c1b65954e395dde533a # Parent 1d926a8daa9279ea36a8694e02e79c64517f5e38 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/fcs_summary commit 72efaa6d006ddda6c8eed10ec9ba541cbdecf3a8" diff -r 1d926a8daa92 -r d2749aa59d20 FCSstats.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FCSstats.R Mon Jun 22 17:33:38 2020 -0400 @@ -0,0 +1,58 @@ +#!/usr/bin/Rscript --vanilla +# FCS Summary Statistic Module for Galaxy +# FlowCore +###################################################################### +# Copyright (c) 2016 Northrop Grumman. +# All rights reserved. +###################################################################### +# +# Version 1 +# Cristel Thomas +# +# + +library(flowCore) + +getMarkerNames <- function(input, output) { + fcs <- read.FCS(input, transformation=F) + + ## marker names + channels <- colnames(fcs) + markers <- as.vector(pData(parameters(fcs))$desc) + df <- data.frame(channels, markers) + fcs_summary <- capture.output(summary(fcs)) + fcs_dim <- capture.output(dim(fcs)) + fcs_markers <- capture.output(df) + + + sink(output) + cat(fcs_dim, sep="\n") + cat("\n\n=========================\n") + cat("== FCS SUMMARY ==\n") + cat("=========================\n") + cat(fcs_summary, sep="\n") + cat("\n\n=========================\n") + cat("== MARKERS IN FCS ==\n") + cat("=========================\n") + cat(fcs_markers, sep="\n") + sink() +} + +checkFCS <- function(input_file, output_file) { + isValid <- F + # Check file beginning matches FCS standard + tryCatch({ + isValid <- isFCSfile(input_file) + }, error = function(ex) { + print (paste(" ! Error in isFCSfile", ex)) + }) + + if (isValid) { + getMarkerNames(input_file, output_file) + } else { + print (paste(input_file, "does not meet FCS standard")) + } +} + +args <- commandArgs(trailingOnly = TRUE) +checkFCS(args[1], args[2]) diff -r 1d926a8daa92 -r d2749aa59d20 FCSstats.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FCSstats.xml Mon Jun 22 17:33:38 2020 -0400 @@ -0,0 +1,72 @@ + + of FCS files + + bioconductor-flowcore + + + + + + + + + + + + + + + + + + + + + diff -r 1d926a8daa92 -r d2749aa59d20 fcs_summary/FCSstats.R --- a/fcs_summary/FCSstats.R Mon Feb 27 12:53:11 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -# FCS Summary Statistic Module for Galaxy -# FlowCore -###################################################################### -# Copyright (c) 2016 Northrop Grumman. -# All rights reserved. -###################################################################### -# -# Version 1 -# Cristel Thomas -# -# - -library(flowCore) - -getMarkerNames <- function(input, output) { - fcs <- read.FCS(input, transformation=F) - - ## marker names - channels <- colnames(fcs) - markers <- as.vector(pData(parameters(fcs))$desc) - df <- data.frame(channels, markers) - fcs_summary <- capture.output(summary(fcs)) - fcs_dim <- capture.output(dim(fcs)) - fcs_markers <- capture.output(df) - - - sink(output) - cat(fcs_dim, sep="\n") - cat("\n\n=========================\n") - cat("== FCS SUMMARY ==\n") - cat("=========================\n") - cat(fcs_summary, sep="\n") - cat("\n\n=========================\n") - cat("== MARKERS IN FCS ==\n") - cat("=========================\n") - cat(fcs_markers, sep="\n") - sink() -} - -checkFCS <- function(input_file, output_file) { - isValid <- F - # Check file beginning matches FCS standard - tryCatch({ - isValid = isFCSfile(input_file) - }, error = function(ex) { - print (paste(" ! Error in isFCSfile", ex)) - }) - - if (isValid) { - getMarkerNames(input_file, output_file) - } else { - print (paste(input_file, "does not meet FCS standard")) - } -} - -args <- commandArgs(trailingOnly = TRUE) -checkFCS(args[2], args[3]) diff -r 1d926a8daa92 -r d2749aa59d20 fcs_summary/FCSstats.xml --- a/fcs_summary/FCSstats.xml Mon Feb 27 12:53:11 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ - - of FCS files. - - r - bioconductor-flowcore - - - - - - - - - - - - - - - - - - - - - diff -r 1d926a8daa92 -r d2749aa59d20 fcs_summary/test-data/summary.txt --- a/fcs_summary/test-data/summary.txt Mon Feb 27 12:53:11 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ - events parameters - 10 13 - - -========================= -== FCS SUMMARY == -========================= - FSC-A FSC-H SSC-A SSC-H APC-A APC-H7-A FITC-A PerCP-Cy5-5-A -Min. 9081 8811 10500 10120 -76.00 168.0 55.51 19.11 -1st Qu. 22040 17990 35210 33090 -50.92 432.4 219.50 69.84 -Median 55080 50380 60520 56110 123.90 1412.0 312.60 190.20 -Mean 69950 58340 67560 57540 553.30 3196.0 758.60 1227.00 -3rd Qu. 100700 90200 100500 71740 232.20 3797.0 1198.00 678.40 -Max. 170500 136000 138000 114000 2955.00 12540.0 2421.00 9038.00 - V450-A V500-A PE-A PE-Cy7-A Time -Min. -7.68 7.68 -12.74 -11.76 0.000 -1st Qu. 147.80 315.80 6.86 46.55 0.025 -Median 638.90 5000.00 168.10 196.50 0.150 -Mean 1956.00 7151.00 180.30 434.20 0.130 -3rd Qu. 1275.00 11500.00 252.10 766.90 0.200 -Max. 12950.00 24690.00 620.30 1694.00 0.300 - - -========================= -== MARKERS IN FCS == -========================= - Channels Markers -1 FSC-A -2 FSC-H -3 SSC-A -4 SSC-H -5 APC-A CD127 -6 APC-H7-A CD45RO -7 FITC-A LIVE -8 PerCP-Cy5-5-A CD4 -9 V450-A CD3 -10 V500-A HLA-DR -11 PE-A CD25 -12 PE-Cy7-A CCR4 -13 Time diff -r 1d926a8daa92 -r d2749aa59d20 fcs_summary/test-data/testfcs1.fcs Binary file fcs_summary/test-data/testfcs1.fcs has changed diff -r 1d926a8daa92 -r d2749aa59d20 test-data/summary.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/summary.txt Mon Jun 22 17:33:38 2020 -0400 @@ -0,0 +1,40 @@ + events parameters + 10 13 + + +========================= +== FCS SUMMARY == +========================= + FSC-A FSC-H SSC-A SSC-H APC-A APC-H7-A FITC-A PerCP-Cy5-5-A +Min. 9081 8811 10500 10120 -76.00 168.0 55.51 19.11 +1st Qu. 22040 17990 35210 33090 -50.92 432.4 219.50 69.84 +Median 55080 50380 60520 56110 123.90 1412.0 312.60 190.20 +Mean 69950 58340 67560 57540 553.30 3196.0 758.60 1227.00 +3rd Qu. 100700 90200 100500 71740 232.20 3797.0 1198.00 678.40 +Max. 170500 136000 138000 114000 2955.00 12540.0 2421.00 9038.00 + V450-A V500-A PE-A PE-Cy7-A Time +Min. -7.68 7.68 -12.74 -11.76 0.000 +1st Qu. 147.80 315.80 6.86 46.55 0.025 +Median 638.90 5000.00 168.10 196.50 0.150 +Mean 1956.00 7151.00 180.30 434.20 0.130 +3rd Qu. 1275.00 11500.00 252.10 766.90 0.200 +Max. 12950.00 24690.00 620.30 1694.00 0.300 + + +========================= +== MARKERS IN FCS == +========================= + Channels Markers +1 FSC-A +2 FSC-H +3 SSC-A +4 SSC-H +5 APC-A CD127 +6 APC-H7-A CD45RO +7 FITC-A LIVE +8 PerCP-Cy5-5-A CD4 +9 V450-A CD3 +10 V500-A HLA-DR +11 PE-A CD25 +12 PE-Cy7-A CCR4 +13 Time diff -r 1d926a8daa92 -r d2749aa59d20 test-data/testfcs1.fcs Binary file test-data/testfcs1.fcs has changed