changeset 6:45db1f97795c draft

planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit e75f078692e313af3295d2d991fcd8d61270242f
author pjbriggs
date Mon, 18 Jun 2018 05:41:05 -0400
parents bbfc9638ba84
children 1cd017d72920
files amplicon_analysis_pipeline.xml relabel_fasta.py tool_dependencies.xml
diffstat 3 files changed, 21 insertions(+), 69 deletions(-) [+]
line wrap: on
line diff
--- a/amplicon_analysis_pipeline.xml	Wed Jun 13 08:39:26 2018 -0400
+++ b/amplicon_analysis_pipeline.xml	Mon Jun 18 05:41:05 2018 -0400
@@ -14,7 +14,7 @@
     <requirement type="package" version="2.2.26">blast-legacy</requirement>
     <requirement type="package" version="0.2.4">fasta-splitter</requirement>
     <requirement type="package" version="2.2">rdp_classifier</requirement>
-    <requirement type="package" version="3.2.0">R</requirement>
+    <requirement type="package" version="3.2.1">R</requirement>
     <requirement type="package" version="1.1.3">vsearch</requirement>
     <!-- microbiomeutil not available in bioconda -->
     <requirement type="package" version="2010-04-29">microbiomeutil</requirement>
--- a/relabel_fasta.py	Wed Jun 13 08:39:26 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Replace FASTA labels with new labels <PREFIX>1, <PREFIX>2,
-<PREFIX>3 etc (where <PREFIX> is a user-provided argument).
-
-Can be used to label OTUs as OTU_1, OTU_2 etc.
-
-This is a reimplementation of the fasta_number.py script from
-https://drive5.com/python/fasta_number_py.html
-"""
-
-import argparse
-
-def relabel_fasta(fp,prefix,include_size=False):
-    """
-    """
-    # Iterate over lines in file
-    nlabel = 0
-    for line in fp:
-        # Strip trailing newlines
-        line = line.rstrip('\n')
-        if not line:
-            # Skip blank lines
-            continue
-        elif line.startswith('>'):
-            # 
-            nlabel += 1
-            label = line[1:].strip()
-            if args.needsize:
-                # Extract size from the label
-                try:
-                    size = filter(
-                        lambda x: x.startswith("size="),
-                        label.split(';'))[0]
-                except Exception as ex:
-                    raise Exception("Couldn't locate 'size' in "
-                                    "label: %s" % label)
-                yield ">%s%d;%s" % (args.prefix,
-                                    nlabel,
-                                    size)
-            else:
-                yield ">%s%d" % (args.prefix,
-                                 nlabel)
-        else:
-            # Echo the line to output
-            yield line
-
-if __name__ == "__main__":
-
-    # Set up command line parser
-    p = argparse.ArgumentParser()
-    p.add_argument("--needsize",action="store_true")
-    p.add_argument("--nosize",action="store_true")
-    p.add_argument("fasta")
-    p.add_argument("prefix")
-    
-    # Process command line
-    args = p.parse_args()
-
-    # Relabel FASTA
-    with open(args.fasta,'rU') as fasta:
-        for line in relabel_fasta(fasta,
-                                  args.prefix,
-                                  include_size=args.needsize):
-            print line
-
-                
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Mon Jun 18 05:41:05 2018 -0400
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<tool_dependency>
+  <package name="amplicon_analysis_pipeline" version="1.2.2">
+      <install version="1.0">
+	<actions>
+	  <action type="download_by_url">https://github.com/MTutino/Amplicon_analysis/archive/v1.2.2.tar.gz</action>
+	  <action type="move_directory_files">
+	    <source>.</source>
+	    <destination>$INSTALL_DIR/Amplicon_analysis_pipeline</destination>
+	  </action>
+	  <action type="set_environment">
+	    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/Amplicon_analysis_pipeline</environment_variable>
+	  </action>
+	</actions>
+      </install>
+  </package>
+  <package name="R" version="3.2.1">
+    <repository changeset_revision="77d439695328" name="package_r_3_2_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+  </package>
+</tool_dependency>