# HG changeset patch
# User jbrayet
# Date 1440150345 14400
# Node ID cf16a057e271ff4338a584dfcf44486d16fb9f78
# Parent 8687649c8ec3fc5608fba098b2940b6d8dc1d1ac
Deleted selected files
diff -r 8687649c8ec3 -r cf16a057e271 sequenza_wrapper.py
--- a/sequenza_wrapper.py Thu Aug 20 05:44:55 2015 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,279 +0,0 @@
-#! /usr/bin/python
-# -*- coding: utf8 -*-
-"""#Sequenza Galaxy - developed by Jocelyn Brayet
-#Copyright (C) 2015 Institut Curie
-#
-#This program is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
-#
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
-#
-#You should have received a copy of the GNU General Public License
-#along with this program. If not, see .
-#
-###########################################################'
-#
-#usage: sequenza_wrapper.py [-h] -normal -tumor
-# -name -gcContent -format
-# -estimation
-# [-ref_file ] [-cellularity ]
-# [-ploidy ] [-selector_index ]
-# [-samtools_options ] -outGalaxy
-#
-#
-#Run Sequenza with Galaxy.
-#
-#optional arguments:
-# -h, --help show this help message and exit
-# -normal , --normalFile
-# Normal input file (BAM, pileup, pileup.gz).
-# -tumor , --tumorFile
-# Tumor input file (BAM, pileup, pileup.gz).
-# -name , --sampleName
-# Sample Name.
-# -gcContent , --GCfile
-# GC content file (txt).
-# -format , --fileFormat
-# Files format.
-# -estimation , --usePersonalEstimation
-# To use sequenza estimation or not.
-# -ref_file , --refFile
-# Index file to samtools mpileup.
-# -cellularity , --cellularityToUsed
-# If estimation = no, cellularity used.
-# -ploidy , --ploidyToUsed
-# If estimation = no, plody used.
-# -selector_index , --selector
-# Source for the reference list.
-# -samtools_options , --samtoolsOptions
-# Samtools options (-A, -B, -d, -q and -Q).
-# -outGalaxy , --outGalaxy
-#
-#Version 1.2 - 05/08/2015 - Adapted from Jocelyn Brayet, France Genomique team
-#
-###########################################################"""
-__author__ = 'Jocelyn Brayet'
-
-###########################################################'
-## Import
-
-import argparse
-import glob
-import os
-import signal
-import subprocess
-
-## Tested with python 2.6.6
-sequenzaVersion = '1.2 - 05/08/2015'
-
-################################ functions ############################################################
-## Define a function to test arguments
-
-def testNone(argument):
- """
- Test if argument is None or not.
- argument -> argument gived by user (XML file)
- """
-
- if not argument is None:
- variable = argument[0]
- else:
- variable = ""
- return variable
-
-def subprocess_setup():
- """
- Python installs a SIGPIPE handler by default. This is usually not what non-Python subprocesses expect.
- """
-
- signal.signal(signal.SIGPIPE, signal.SIG_DFL)
-
-def createHTML(resultFile,resultPath,sample):
- """
- Building a result HTML displayed in Galaxy.
- resultFile -> HTML file
- resultPath -> Galaxy result path
- sample -> sample name
- """
-
- resultHTML=open(resultFile,"w")
-
- cmdLine="cd "+resultPath.replace(os.path.basename(resultPath),"")+"; tar czf all_files.tar.gz "+os.path.basename(resultPath)
- os.system(cmdLine)
- os.system("mv "+resultPath.replace(os.path.basename(resultPath),"")+"all_files.tar.gz "+resultPath)
-
- resultHTML.write("\n\n\n\n")
- resultHTML.write("
Genome-wide allele-specific copy number profile obtained from exome sequencing (top), genome-wide absolute copy number profile obtained from exome sequencing (middle) and depth ratio (bottom).
\n")
-
- fileList=glob.glob(resultPath+"/segments_*.txt")
- alternativeSolutionsList=""
-
- for segmentsFile in fileList:
- if not "segments_1.txt" in segmentsFile:
- alternativeSolutionsList = alternativeSolutionsList+" "+segmentsFile
-
- os.system("mkdir "+resultPath+"/segments")
- os.system("mv "+alternativeSolutionsList+" "+resultPath+"/segments")
- cmdLine="cd "+resultPath+"; tar czf "+sample+"_segments.tar.gz segments"
- os.system(cmdLine)
-
- resultHTML.write("
Result from the inference over the defined range of cellularity and ploidy. Color intensity indicates the log posterior probability of corresponding cellularity/ploidy values.
Observed depth ratio and BAF values for each genomic segment (black circles and dots) along with the representative joint LPP density (colors). The representative joint LPP density is calculated for the best cellularity and ploidy.
Observed depth ratio and BAF values for each genomic segment (black circles and dots) along with the representative joint LPP density (colors). The representative joint LPP density is calculated for the alternative cellularity and ploidy (scroll).