# HG changeset patch # User joachim-jacob # Date 1360662467 18000 # Node ID 59c0a4f9c9ff120ed99a2a1fc9b3aec81900d211 # Parent 776730cc0cf671b70b864cbe3d091c62d42ce20d Deleted selected files diff -r 776730cc0cf6 -r 59c0a4f9c9ff qualimap_suite/README --- a/qualimap_suite/README Tue Feb 12 04:47:18 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -qualimap - 1.0.0 -===================================================================== - - -SUMMARY -------- -Qualimap examines sequencing alignment data in SAM/BAM files and provides an overall view of the data that helps to the detect biases in the sequencing and/or mapping of the data and eases decision-making for further analysis. - -http://qualimap.bioinfo.cipf.es/ - -Garcia-Alcalde et.al, (2012) Qualimap: evaluating next generation sequencing aligmnent data, -Bioinformatics. doi: 10.1093/bioinformatics/bts503 - -REQUIREMENTS AND INSTALLATION ------------------------------ -Install this tool in your Galaxy via the Toolshed - - ) Third party code installation - Required: qualimap JAR archives. - - ) Integration into Galaxy - Please use the toolshed - -DETAILS AND ISSUES ------------------- - ) Only bamqc provided in this first version - ) bamqc: allow passing number of threads, and take into account number of 'chunks' - ) bamqc: - -===================================================================== diff -r 776730cc0cf6 -r 59c0a4f9c9ff qualimap_suite/bamqc.xml --- a/qualimap_suite/bamqc.xml Tue Feb 12 04:47:18 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,238 +0,0 @@ - - - - - to asses mapping quality metrics. - - - - qualimap --version - - - - qualimap - - - - ## it is recommended that you write a wrapper for your tool - ## and pass all parameters to that tool, which parses them. - bamqc_wrapper.pl $configfile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## first we pass some galaxy environment variables - galtemp==${__new_file_path__} - - bamqc_result==$bamqc_result - outputdir==$bamqc_result.files_path - bam==$bam - c==$c - hm==$hm - nr==$nr - #if $customgtf.upload=="yes" - gff==$customgtf.gff - os==$customgtf.os - p==$customgtf.p - #end if - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -**Tool Overview** - -Tool_ allows for simply but throroughly checking of the quality of mapping. - -.. _Tool: http://qualimap.bioinfo.cipf.es// - ------- - -**Know what you are doing** - -.. class:: warningmark - -Know what you are doing by reading the `documentation`__ and experimenting. - -.. __: http://tophat.cbcb.umd.edu/manual.html - ------- - -**Input formats** - -Tool accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files. - ------- - -**Outputs** - -Tool produces two output files: - -- junctions -- A UCSC BED_ track of junctions reported by TopHat. Each junction consists of two connected BED blocks, where each block is as long as the maximal overhang of any read spanning the junction. The score is the number of alignments spanning the junction. -- accepted_hits -- A list of read alignments in BAM_ format. - -.. _BED: http://genome.ucsc.edu/FAQ/FAQformat.html#format1 -.. _BAM: http://samtools.sourceforge.net/ - -Two other possible outputs, depending on the options you choose, are insertions and deletions, both of which are in BED format. - -------- - -**Tool settings** - -All of the options have a default value. You can change any of them. Some of the options in Tophat have been implemented here. - ------- - -**Tool parameter list** - -This is a list of implemented Tophat options:: - - -r This is the expected (mean) inner distance between mate pairs. For, example, for paired end runs with fragments - selected at 300bp, where each end is 50bp, you should set -r to be 200. There is no default, and this parameter - is required for paired end runs. - - - - diff -r 776730cc0cf6 -r 59c0a4f9c9ff qualimap_suite/bamqc_wrapper.pl --- a/qualimap_suite/bamqc_wrapper.pl Tue Feb 12 04:47:18 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -#!/usr/bin/perl -# bamqc_wrapper.pl -# Joachim Jacob - joachim.jacob@gmail.com - 2013 - -use strict; -use File::Temp 'tempdir'; -use File::Basename; -use Log::Log4perl qw(:easy); - -# ---------------------- Prepping Logging -----------------------------# -######################################################################## -# Log levels: $DEBUG $INFO $WARN $ERROR $FATAL -# ConversionPattern: %d %-5p %F{1} [%M] (line %L): %m%n%n -my $log_conf = q/ - log4perl.category = ERROR, Screen - log4perl.appender.Screen.stderr=1 - log4perl.appender.Screen.layout=Log::Log4perl::Layout::PatternLayout - log4perl.appender.Screen.layout.ConversionPattern = %d %-5p %m%n - log4perl.appender.Screen = Log::Log4perl::Appender::Screen -/; - -Log::Log4perl::init( \$log_conf ); -my $logger = get_logger(); - -# ----------------- Getting parameters file ---------------------------# -######################################################################## -my ($configfile) = @ARGV; -my (%para); -open(CONFIG,"<$configfile"); -while () { - if (/(\S+)==(.+)$/){ $para{ $1 } = $2 ; } -} -close(CONFIG); - -=Excerpt Config parameters - - ## first we pass some galaxy environment variables - galtemp==${__new_file_path__} - - bam==$bam - c==$c - hm==$hm - nr==$nr - #if $customgtf.upload=="yes" - gff==$customgtf.gff - os==$customgtf.os - p==$customgtf.p - #end if - -=cut - -for my $para (keys %para){ - INFO "$para\tset to\t$para{$para}"; -} - - -# ---------------------- Prepping temp dir ----------------------------# -######################################################################## -# within the temporary directory of Galaxy, we create a temporary dir - -my $galtemp = $para{'galtemp'}; -DEBUG "\nReceived Galaxy temporary directory:\n$galtemp"; - -my $tempdir = File::Temp->tempdir('tmpXXXXX', DIR => $galtemp, CLEANUP => 1); -mkdir "$tempdir", 077 unless -d "$tempdir"; -INFO "\nTemporary directory:\n$tempdir"; - - -# ---------------------- Output files ---------------------------------# -######################################################################## -# Two possible scenarios -# - output is written to the file at the output location in config file -# - output is moved to the output file location - -# open (SAMOUTPUT, ">$para{'output_sam'}") -# or ( ERROR "Could not open output file for writing! (file:$para{'output_sam'}" and die ); -# print SAMOUTPUT "Here comes sam\n"; -# close (SAMOUTPUT); - - -# -------------------- Assembling command ----------------------------# -######################################################################## -my $outdir="bamqc_output"; -my $qualimap_path=""; # for tool_dependency later on -my $command = $qualimap_path."qualimap bamqc --outdir $outdir"; # this will ultimately be executed - -# based on parameters, which are called by $para{'parametername'} -# the command is assembled -$command .= " -bam $para{'bam'} -hm $para{'hm'} -nr $para{'nr'}"; -if($para{'c'}){$command .= " $para{'c'} "; } -if ( $para{'gff'} ){ - $command .= " -gff $para{'gff'} -p $para{'p'} "; - if($para{'os'}) { - $command .= $para{'os'}; - } -} - -$command .= " -nt 4 -outformat HTML"; - - -# --------------------- Executing command ----------------------------# -######################################################################## -run_process($command, "qualimap bamqc", "."); - - -# ----------------- Postprocessing command ---------------------------# -######################################################################## -# Hackish !! - -my $librarydir = dirname($para{'bamqc_result'}); -my $jobworkdir = dirname($para{'outputdir'}); -my $files_path_name = basename($para{'outputdir'}); -INFO "\n Librarydir = $librarydir \n jobworkdir = $jobworkdir \n files_path_name = $files_path_name \n"; -system("mv $jobworkdir/bamqc_output $librarydir/$files_path_name") == 0 or die "Could not move output data to $librarydir\n"; -system("rm -rf $para{'bamqc_result'}") == 0 or die "Could not post-process the results...\n"; -system("ln -s $librarydir/$files_path_name/qualimapReport.html $para{'bamqc_result'}") == 0 or die "Could not move output data to $librarydir\n"; - - -# --------------------------- Exiting --------------------------------# -######################################################################## -exit 0; - - - -### Subroutines ### -######################################################################## -sub run_process { - my ($command, $name, $tempdir)= @_; - my $logger = get_logger(); - INFO "\nProcess to launch:\n $command\nIn directory\n$tempdir\n"; - system("cd $tempdir; $command 2>/dev/null") == 0 or die "$name failed\nExit status $?\nCommand: $command"; - if ($? == -1) { - print "failed to execute: $!\n"; - } elsif ($? & 127) { - printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; - } else { - printf "$name executed successfully\n", $? >> 8; - } -} - - -