Repository 're_utils'
hg clone https://toolshed.g2.bx.psu.edu/repos/petr-novak/re_utils

Changeset 14:62fefa284036 (2020-02-07)
Previous changeset 13:f12eb3896842 (2020-02-07) Next changeset 15:a675b4534b19 (2020-04-24)
Commit message:
Uploaded
modified:
RM_custom_search.py
RM_custom_search.xml
rmsk_summary_table_multiple.r
b
diff -r f12eb3896842 -r 62fefa284036 RM_custom_search.py
--- a/RM_custom_search.py Fri Feb 07 02:25:47 2020 -0500
+++ b/RM_custom_search.py Fri Feb 07 06:06:47 2020 -0500
[
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 ''' RepeatMasker search against custom database
 input:
 - archive with sequencing data
@@ -57,7 +57,7 @@
 
 def summarizeRepeatMaskerOutput(htmlout = "summary.html"):
     cmd = os.path.dirname(os.path.abspath(__file__))+"/rmsk_summary_table_multiple.r"
-    args = [ cmd, "-f", "dir_CL*/reads.fas", "-r", "dir_CL*/reads.fas.out", "-o", "RM-custom_output_table"  ]
+    args = [ cmd, "dir_CL*/reads.fas", "dir_CL*/reads.fas.out", "RM-custom_output_table"  ]
     status=subprocess.call(args)
     cmd = cmd = os.path.dirname(os.path.abspath(__file__))+"/RM_html_report.R"
     args = [cmd, htmlout]
b
diff -r f12eb3896842 -r 62fefa284036 RM_custom_search.xml
--- a/RM_custom_search.xml Fri Feb 07 02:25:47 2020 -0500
+++ b/RM_custom_search.xml Fri Feb 07 06:06:47 2020 -0500
b
@@ -1,15 +1,17 @@
-<tool id="RMsearch" name="RepeatMasker custom search" version="1.0.3">
+<tool id="RMsearch2" name="RepeatMasker custom search2" version="1.0.3">
 
   <description>Scan clustering results using RepeatMasker against custom database of repeats</description>
   <requirements>
     <requirement type="package" version="4.0.7">repeatmasker</requirement> 
-    <requirement type="package">r-r2html</requirement>
-    <requirement type="package">r-getopt</requirement>
-    <requirement type="package">bioconductor-biostrings</requirement>
+    <requirement type="package" version="3.6">python</requirement> 
+    <requirement type="package" version="2.3.2">r-r2html</requirement>
+    <requirement type="package" version="2.54.0">bioconductor-biostrings</requirement>
   </requirements>
 
-  <command interpreter="python3">
-    RM_custom_search.py -i $input_zip -d $RMdatabase -g $__root_dir__ -r $output_html
+  <command>
+
+    python3 ${__tool_directory__}/RM_custom_search.py -i $input_zip -d $RMdatabase -g $__root_dir__ -r $output_html;
+
   </command>
 
   <inputs>
b
diff -r f12eb3896842 -r 62fefa284036 rmsk_summary_table_multiple.r
--- 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
 }