changeset 8:67213c4eefa6 draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/snvtocnv commit 10ad3a0ca7cd23ad1e0940844147e1d1b3d069f0"
author artbio
date Sun, 07 Mar 2021 23:13:08 +0000
parents e66b91475343
children f3bacfd9b670
files sanitize_snv.py segmentation_sequenza.R sequenza_index.xml sequenza_to_hrdtools_input.R snvtocnv.xml
diffstat 5 files changed, 17 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/sanitize_snv.py	Sun Mar 07 14:21:06 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-import sys
-
-handle = open(sys.argv[1], 'r')
-out = open(sys.argv[2], 'w')
-for line in handle:
-    if line[0] == '#':
-        out.write(line)
-        continue
-    linelist = line.split('\t')
-    refcol = linelist[0].split('chr')
-    infocol = linelist[7].split('INDEL')
-    if len(infocol) > 1:
-        continue
-    if len(refcol) > 1:
-        refcol = refcol[1]
-    else:
-        refcol = refcol[0]
-    if refcol not in ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
-                      '11', '12', '13', '14', '15', '16', '17', '18', '19',
-                      '20', '21', '22', 'X', 'Y']:
-        continue
-    else:
-        linelist[0] = refcol
-        out.write('\t'.join(linelist))
--- a/segmentation_sequenza.R	Sun Mar 07 14:21:06 2021 +0000
+++ b/segmentation_sequenza.R	Sun Mar 07 23:13:08 2021 +0000
@@ -1,10 +1,13 @@
-options(warn = -1)
+options(show.error.messages = F, error = function() {
+        cat(geterrmessage(), file = stderr()); q("no", 1, F) })
 
 # load packages that are provided in the conda env
 library(optparse)
 library(sequenza)
 library(BiocParallel)
 library(tidyverse)
+library(readr)
+
 option_list <- list(
   make_option(
     c("-i", "--input"),
@@ -41,8 +44,14 @@
                "chr10", "chr11", "chr12", "chr13", "chr14", "chr15", "chr16", "chr17",
                "chr18", "chr19", "chr20", "chr21", "chr22")
 
+Sys.setenv(TZDIR = "/usr/share/zoneinfo/")
+Sys.setenv(TZ = "US/Eastern")
+options(tz = "US/Eastern")
+Sys.timezone(location = TRUE)
+
+
 segfile <- sequenza.extract(data_file,
-                            verbose = TRUE,
+                            verbose = FALSE,
                             chromosome.list = chrom_list)
 
 ## Estimation of cellularity and ploidy
--- a/sequenza_index.xml	Sun Mar 07 14:21:06 2021 +0000
+++ b/sequenza_index.xml	Sun Mar 07 23:13:08 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="sequenzaindex" name="create GC_wiggle of reference genome" version="0.6.1">
+<tool id="sequenzaindex" name="create GC_wiggle of reference genome" version="0.7.0">
     <description>
     </description>
     <macros>
--- a/sequenza_to_hrdtools_input.R	Sun Mar 07 14:21:06 2021 +0000
+++ b/sequenza_to_hrdtools_input.R	Sun Mar 07 23:13:08 2021 +0000
@@ -1,4 +1,5 @@
-options(warn = -1)
+options(show.error.messages = F, error = function() {
+        cat(geterrmessage(), file = stderr()); q("no", 1, F) })
 
 # load packages that are provided in the conda env
 
@@ -61,6 +62,6 @@
 print(reformatted)
 
 reformatted %>%
-  write.table(opt$output, quote=F, row.names=F, sep="\t")
+  write.table(opt$output, quote = F, row.names = F, sep = "\t")
 
 message(sprintf("Output written to %s", opt$output))
--- a/snvtocnv.xml	Sun Mar 07 14:21:06 2021 +0000
+++ b/snvtocnv.xml	Sun Mar 07 23:13:08 2021 +0000
@@ -1,16 +1,16 @@
-<tool id="snvtocnv" name="Infer CNVs from SNVs" version="0.6.1">
+<tool id="snvtocnv" name="Infer CNVs from SNVs" version="0.7.0">
     <description>
     </description>
     <macros>
         <import>macro.xml</import>
     </macros>
     <requirements>
-        <requirement type="package" version="1.6">samtools</requirement>
         <requirement type="package" version="3.0.0">sequenza-utils</requirement>
         <requirement type="package" version="3.0.0">r-sequenza</requirement>
         <requirement type="package" version="1.6.6">r-optparse</requirement>
         <requirement type="package" version="1.24.0">bioconductor-biocparallel</requirement>
         <requirement type="package" version="1.3.0">r-tidyverse</requirement>
+        <requirement type="package" version="2021a=he74cb21_0">tzdata</requirement>
     </requirements>
     <stdio>
         <exit_code range="1:" level="fatal" description="Error occured" />