changeset 29:c8acc8808b52 draft

Uploaded
author charles-bernard
date Sat, 19 Nov 2016 04:25:42 -0500
parents 2496883e588b
children 1c9cea51dc24
files ALFA/.shed.yml ALFA/ALFA_wrapper.py ALFA/alfa_wrapper.xml ALFA/tool_dependencies.xml
diffstat 4 files changed, 38 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ALFA/.shed.yml	Sat Nov 19 04:25:42 2016 -0500
@@ -0,0 +1,14 @@
+categories:
+- Graphics
+- Next Gen Mappers
+- Sequence Analysis
+- Visualization
+description: A tool to Compute and display distribution of reads by genomic categories
+long_description: |
+	ALFA provides a global overview of features distribution composing New Generation Sequencing dataset(s).
+	Given a set of aligned reads (BAM files) and an annotation file (GTF format), the tool produces plots of the raw and normalized distributions of those reads among genomic categories (stop codon, 5'-UTR, CDS, intergenic, etc.) and biotypes (protein coding genes, miRNA, tRNA, etc.). Whatever the sequencing technique, whatever the organism.
+    https://github.com/biocompibens/ALFA.git
+name: alfa
+owner: charles_bernard
+remote_repository_url: https://github.com/charles-bernard/Galaxy_tools/tree/master/ALFA
+type: unrestricted
\ No newline at end of file
--- a/ALFA/ALFA_wrapper.py	Fri Nov 04 06:12:07 2016 -0400
+++ b/ALFA/ALFA_wrapper.py	Sat Nov 19 04:25:42 2016 -0500
@@ -48,8 +48,6 @@
     index='index'
     os.symlink(stranded_index, index + '.stranded.index')
     os.symlink(unstranded_index, index + '.unstranded.index')
-    #shutil.copy(stranded_index, index + '.stranded.index')
-    #shutil.copy(unstranded_index, index + '.unstranded.index')
     return index
 
 def get_input2_args(reads_list, format):
@@ -57,14 +55,14 @@
     if n%2 != 0:
         exit_and_explain('Problem with pairing reads filename and reads label')
     input2_args='-i'
-    k = 0
+    k = 1
     reads_filenames = [''] * (n/2)
     reads_labels = [''] * (n/2)
     for i in range(0, n, 2):
         reads_filenames[k] = reads_list[i].split('__fname__')[1]
         reads_labels[k] = reads_list[i+1].split('__label__')[1]
         if not reads_labels[k]:
-            reads_labels[k] = 'sample_%s' % str(k+1)
+            reads_labels[k] = 'sample_%s' % str(k)
         input2_args='%s %s %s' % (input2_args, reads_filenames[k], reads_labels[k])
         k += 1
     if format == 'bedgraph':
@@ -88,8 +86,7 @@
     merged_count_file = open('count_file.txt', 'wb')
     for i in range(0, len(reads_labels)):
         current_count_file = open(reads_labels[i] + '.categories_counts', 'r')
-        reads_label = reads_labels[i]
-        merged_count_file.write('##LABEL: %s\n\n' % reads_label)
+        merged_count_file.write('##LABEL: %s\n\n' % reads_label[i])
         merged_count_file.write(current_count_file.read())
         merged_count_file.write('__________________________________________________________________\n')
         current_count_file.close()
@@ -180,4 +177,4 @@
             shutil.move(args.bi_indexes[1] + '.unstranded.index', args.output_index[1])
 
     cleanup_before_exit(tmp_dir)
-main()
\ No newline at end of file
+main()
--- a/ALFA/alfa_wrapper.xml	Fri Nov 04 06:12:07 2016 -0400
+++ b/ALFA/alfa_wrapper.xml	Sat Nov 19 04:25:42 2016 -0500
@@ -16,37 +16,37 @@
 
 		##__INPUT 1__##
 		#if str ( $annotation.annotationSource['annotationSourceSelection'] ) == "index"
-			--index $annotation.annotationSource['strandedIndex'] $annotation.annotationSource['unstrandedIndex']
+			--index "$annotation.annotationSource['strandedIndex']" "$annotation.annotationSource['unstrandedIndex']"
 		#else if str ( $annotation.annotationSource['annotationSourceSelection'] ) == "built_in_index"
-			--bi_index $annotation.annotationSource.built_in_index_prefix.fields.prefix
+			--bi_index "$annotation.annotationSource.built_in_index_prefix.fields.prefix"
 		#else
-			--annotation $annotation.annotationSource['annotationFile']
+			--annotation "$annotation.annotationSource['annotationFile']"
 		#end if
 
 		##__INPUT 2__##
 		--reads_format $reads.readsType['readsTypeSelection']
 			--reads
 		#for $i, $r in enumerate ( $reads.readsType['readsList'] ) 
-			__fname__$r.readsFile
-			__label__$r.readsLabel
+			"__fname__$r.readsFile"
+			"__label__$r.readsLabel"
 		#end for
 		--strandness $reads['strandness']
 
 		##__OUTPUT FILES__##
 		#if str ( $outputFiles['plot'] ) == "True"
 			#if str ( $outputOptions['plotFormat'] ) == "pdf"
-				--output_pdf $outputPdf
+				--output_pdf "$outputPdf"
 			#else if str ( $outputOptions['plotFormat'] ) == "png"
-				--output_png $outputCategoriesPng $outputBiotypesPng
+				--output_png "$outputCategoriesPng" "$outputBiotypesPng"
 			#else
-				--output_svg $outputCategoriesSvg $outputBiotypesSvg
+				--output_svg "$outputCategoriesSvg" "$outputBiotypesSvg"
 			#end if
 		#end if
 		#if str ( $outputFiles['countFile'] ) == "True"
-			--output_count $outputCountFile
+			--output_count "$outputCountFile"
 		#end if
 		#if str ( $outputFiles['index'] ) == "True"
-			--output_index $outputStrandedIndex $outputUnstrandedIndex
+			--output_index "$outputStrandedIndex" "$outputUnstrandedIndex"
 		#end if
 
 		##__OUTPUT OPTIONS__##
@@ -58,8 +58,8 @@
 			#end if
 		#end if
 
-		--log_report $logReport
-		--tool_dir $__tool_directory__
+		--log_report "$logReport"
+		--tool_dir "$__tool_directory__"
 	]]>
 	</command>
 	<inputs>
@@ -326,4 +326,4 @@
      		}
      	</citation>
      </citations>
-</tool>
\ No newline at end of file
+</tool>
--- a/ALFA/tool_dependencies.xml	Fri Nov 04 06:12:07 2016 -0400
+++ b/ALFA/tool_dependencies.xml	Sat Nov 19 04:25:42 2016 -0500
@@ -2,10 +2,10 @@
 	<package name="bedtools" version="2.24">
 		<repository changeset_revision="3416a1d4a582" name="package_bedtools_2_24" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
 	</package>
-    <package name="samtools" version="1.2">
-    	<repository changeset_revision="f6ae3ba3f3c1" name="package_samtools_1_2" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="matplotlib" version="1.4">
-    	<repository changeset_revision="f7424e1cf115" name="package_python_2_7_matplotlib_1_4" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>
\ No newline at end of file
+    	<package name="samtools" version="1.2">
+    		<repository changeset_revision="f6ae3ba3f3c1" name="package_samtools_1_2" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
+	</package>
+    	<package name="matplotlib" version="1.4">
+    		<repository changeset_revision="f7424e1cf115" name="package_python_2_7_matplotlib_1_4" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
+    	</package>
+</tool_dependency>