Mercurial > repos > petr-novak > re_utils
diff rmsk_summary_table_multiple.r @ 14:62fefa284036 draft
Uploaded
author | petr-novak |
---|---|
date | Fri, 07 Feb 2020 06:06:47 -0500 |
parents | a4cd8608ef6b |
children |
line wrap: on
line diff
--- a/rmsk_summary_table_multiple.r Fri Feb 07 02:25:47 2020 -0500 +++ b/rmsk_summary_table_multiple.r Fri Feb 07 06:06:47 2020 -0500 @@ -3,19 +3,12 @@ # analysis of *.out file # input arguments: <rmsk_result.out> <reads.fas. # calculates totoal proportion of matched repetetive families and averagee score and print the table -suppressPackageStartupMessages(library(getopt)) -# INPUT ARGUMENTS: -opt = getopt(matrix(c( - 'fasta', 'f', 1, "character", - 'repeat_masker','r', 1, "character", - 'output', 'o', 1, "character", - 'help','h',0,'logical'),ncol=4,byrow=T)) +opt = list() +opt$fasta = commandArgs(T)[1] +opt$repeat_masker = commandArgs(T)[2] +opt$output = commandArgs(T)[3] -if (!is.null(opt$help)) { -cat("Usage:\n\n -f fasta file \n -r repeat masker output\n -o output files\n") -stop() -} RMfiles=system(paste("ls ",opt$repeat_masker,sep=""),intern=T) fasta=system(paste("ls ",opt$fasta,sep=""),intern=T) @@ -23,8 +16,8 @@ getsubdir=function(x){ - xx=gsub(".*/","",x) - sdir=gsub(xx,"",x,fixed=T) + xx=gsub(".*/","",x) + sdir=gsub(xx,"",x,fixed=T) sdir }