Mercurial > repos > devteam > fastqc
changeset 8:06819360a9e2 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/fastqc commit df4c0b0c6372e2984966e220fa42ecd8a3d370e8
author | devteam |
---|---|
date | Mon, 31 Oct 2016 10:40:12 -0400 |
parents | 3fdc1a74d866 |
children | 3a458e268066 |
files | rgFastQC.py rgFastQC.xml tool_dependencies.xml |
diffstat | 3 files changed, 24 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/rgFastQC.py Mon Apr 11 10:27:34 2016 -0400 +++ b/rgFastQC.py Mon Oct 31 10:40:12 2016 -0400 @@ -30,12 +30,12 @@ import zipfile class FastQCRunner(object): - + def __init__(self,opts=None): ''' Initializes an object to run FastQC in Galaxy. To start the process, use the function run_fastqc() ''' - + # Check whether the options are specified and saves them into the object assert opts != None self.opts = opts @@ -44,7 +44,7 @@ ''' Develops the Commandline to run FastQC in Galaxy ''' - + # Check whether a given file compression format is valid # This prevents uncompression of already uncompressed files infname = self.opts.inputfilename @@ -52,7 +52,7 @@ trimext = False # decompression at upload currently does NOT remove this now bogus ending - fastqc will barf # patched may 29 2013 until this is fixed properly - if ( linf.endswith('.gz') or linf.endswith('.gzip') ): + if ( linf.endswith('.gz') or linf.endswith('.gzip') ): f = gzip.open(self.opts.input) try: f.readline() @@ -76,12 +76,12 @@ except: raise Exception("Input file corruption, could not identify the filetype") infname = os.path.splitext(infname)[0] - + # Replace unwanted or problematic charaters in the input file name self.fastqinfilename = re.sub(ur'[^a-zA-Z0-9_\-\.]', '_', os.path.basename(infname)) # check that the symbolic link gets a proper ending, fastqc seems to ignore the given format otherwise if 'fastq' in opts.informat: - # with fastq the .ext is ignored, but when a format is actually passed it must comply with fastqc's + # with fastq the .ext is ignored, but when a format is actually passed it must comply with fastqc's # accepted formats.. opts.informat = 'fastq' elif not self.fastqinfilename.endswith(opts.informat): @@ -103,13 +103,13 @@ ''' Retrieves the output html and text files from the output directory and copies them to the Galaxy output files ''' - + # retrieve html file result_file = glob.glob(opts.outputdir + '/*html') with open(result_file[0], 'rb') as fsrc: with open(self.opts.htmloutput, 'wb') as fdest: shutil.copyfileobj(fsrc, fdest) - + # retrieve text file text_file = glob.glob(opts.outputdir + '/*/fastqc_data.txt') with open(text_file[0], 'rb') as fsrc: @@ -120,11 +120,11 @@ ''' Executes FastQC. Make sure the mandatory import parameters input, inputfilename, outputdir and htmloutput have been specified in the options (opts) ''' - + # Create a log file dummy,tlog = tempfile.mkstemp(prefix='rgFastQC',suffix=".log",dir=self.opts.outputdir) sout = open(tlog, 'w') - + self.prepare_command_line() sout.write(self.command_line) sout.write('\n') @@ -150,12 +150,12 @@ op.add_option('-l', '--limits', default=None) op.add_option('-e', '--executable', default='fastqc') opts, args = op.parse_args() - + assert opts.input != None assert opts.inputfilename != None assert opts.htmloutput != None - if not os.path.exists(opts.outputdir): + if not os.path.exists(opts.outputdir): os.makedirs(opts.outputdir) - + fastqc_runner = FastQCRunner(opts) fastqc_runner.run_fastqc()
--- a/rgFastQC.xml Mon Apr 11 10:27:34 2016 -0400 +++ b/rgFastQC.xml Mon Oct 31 10:40:12 2016 -0400 @@ -1,7 +1,7 @@ -<tool id="fastqc" name="FastQC" version="0.65"> +<tool id="fastqc" name="FastQC" version="0.66"> <description>Read Quality reports</description> <requirements> - <requirement type="package" version="0.11.4">FastQC</requirement> + <requirement type="package" version="0.11.5">fastqc</requirement> </requirements> <stdio> <exit_code range="1:" /> @@ -9,8 +9,8 @@ <regex match="Error:" /> <regex match="Exception:" /> </stdio> - <command interpreter="python"> - rgFastQC.py + <command><![CDATA[ + python '$__tool_directory__'/rgFastQC.py -i "$input_file" -d "$html_file.files_path" -o "$html_file" @@ -23,10 +23,10 @@ #if $limits.dataset and str($limits) > '' -l "$limits" #end if - </command> + ]]></command> <inputs> <param format="fastqsanger,fastq,bam,sam" name="input_file" type="data" label="Short read data from your current history" /> - <param name="contaminants" type="data" format="tabular" optional="true" label="Contaminant list" + <param name="contaminants" type="data" format="tabular" optional="true" label="Contaminant list" help="tab delimited file with 2 columns: name and sequence. For example: Illumina Small RNA RT Primer CAAGCAGAAGACGGCATACGA"/> <param name="limits" type="data" format="txt" optional="true" label="Submodule and Limit specifing file" help="a file that specifies which submodules are to be executed (default=all) and also specifies the thresholds for the each submodules warning parameter" /> @@ -45,8 +45,8 @@ <test> <param name="input_file" value="1000gsample.fastq" /> <param name="limits" value="fastqc_customlimits.txt" ftype="txt" /> - <output name="html_file" file="fastqc_report2.html" ftype="html" lines_diff="100"/> - <output name="text_file" file="fastqc_data2.txt" ftype="txt" lines_diff="100"/> + <output name="html_file" file="fastqc_report2.html" ftype="html" compare="sim_size" delta="4096"/> + <output name="text_file" file="fastqc_data2.txt" ftype="txt" compare="sim_size"/> </test> </tests> <help> @@ -56,9 +56,9 @@ **Purpose** FastQC aims to provide a simple way to do some quality control checks on raw -sequence data coming from high throughput sequencing pipelines. +sequence data coming from high throughput sequencing pipelines. It provides a modular set of analyses which you can use to give a quick -impression of whether your data has any problems of +impression of whether your data has any problems of which you should be aware before doing any further analysis. The main functions of FastQC are: @@ -91,7 +91,7 @@ **Inputs and outputs** -FastQC_ is the best place to look for documentation - it's very good. +FastQC_ is the best place to look for documentation - it's very good. A summary follows below for those in a tearing hurry. This wrapper will accept a Galaxy fastq, sam or bam as the input read file to check.
--- a/tool_dependencies.xml Mon Apr 11 10:27:34 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="FastQC" version="0.11.4"> - <repository changeset_revision="a8f485b2efd9" name="package_fastqc_0_11_4" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency>