Mercurial > repos > nikos > rna_probing
comparison k2n.R @ 19:ceb96c265bd1 draft
Trying to set environment r lib path dependencies.
| author | nikos |
|---|---|
| date | Wed, 11 Feb 2015 08:05:10 -0500 |
| parents | 31f25b37187b |
| children | f64937805d0d |
comparison
equal
deleted
inserted
replaced
| 18:c139b9abe064 | 19:ceb96c265bd1 |
|---|---|
| 1 ## Setup R error handling to go to stderr | |
| 2 options( show.error.messages = FALSE, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) | |
| 3 | |
| 4 # we need that to not crash galaxy with an UTF8 error on German LC settings. | |
| 5 Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") | |
| 6 | |
| 1 options(stringAsfactors = FALSE, useFancyQuotes = FALSE) | 7 options(stringAsfactors = FALSE, useFancyQuotes = FALSE) |
| 2 args <- commandArgs(trailingOnly = TRUE) | 8 args <- commandArgs(trailingOnly = TRUE) |
| 3 | 9 |
| 4 library(RNAprobR) | 10 .libPaths(args[1]) |
| 11 suppressMessages(require(RNAprobR)) | |
| 5 | 12 |
| 6 # Read inputs | 13 # Read inputs |
| 7 merged <- args[1] | 14 merged <- args[2] |
| 8 unique_barcodes <- args[2] | 15 unique_barcodes <- args[3] |
| 9 output <- args[3] | 16 output <- args[4] |
| 10 | 17 |
| 11 k2n_calc( merged, unique_barcodes, output ) | 18 k2n_calc( merged, unique_barcodes, output ) |
