Repository 'blast_to_scaffold'
hg clone https://toolshed.g2.bx.psu.edu/repos/drosofff/blast_to_scaffold

Changeset 4:3288cc5a57e5 (2016-03-25)
Previous changeset 3:e279e53a3fde (2016-03-25) Next changeset 5:81ffa74cf96e (2016-11-09)
Commit message:
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/blast_to_scaffold commit fb47b9859a0703f1fa4a1e76b75b9dae29ca8329
modified:
blast_to_scaffold.py
blast_to_scaffold.xml
test-data/assembly.fa
b
diff -r e279e53a3fde -r 3288cc5a57e5 blast_to_scaffold.py
--- a/blast_to_scaffold.py Fri Mar 25 19:14:20 2016 -0400
+++ b/blast_to_scaffold.py Fri Mar 25 19:21:26 2016 -0400
[
@@ -30,6 +30,10 @@
         '--blast-tab', dest="blast_tab", action="store", type=str, help="13-columns tabular blastn or tblastx output")
     the_parser.add_argument(
         '--output', action="store", type=str, help="output file path, fasta format")
+    the_parser.add_argument(
+        '--scaffold_prefix', action="store", type=str, help="the prefix that will be used for the header of the fasta scaffold")
+    the_parser.add_argument(
+        '--scaffold_suffix', action="store", type=str, help="the sufix that will be used for the header of the fasta scaffold")
     args = the_parser.parse_args()
     return args
     
@@ -98,13 +102,13 @@
         for i, nucleotide in enumerate(sequence):
             GuideDict[i+subjectStart] = nucleotide
             
-def finalAssembly (GuideDict, outputfile):
+def finalAssembly (GuideDict, outputfile, prefix, suffix):
     finalSeqList = []
     for keys in sorted(GuideDict):
         finalSeqList.append(GuideDict[keys])
     finalSequence = insert_newlines("".join(finalSeqList) )
     Out = open (outputfile, "w")
-    print >> Out, ">Scaffold"
+    print >> Out, ">Scaffold_from_%s_guided_by_%s" % (prefix, suffix)
     print >> Out, finalSequence
     Out.close()
     
@@ -114,7 +118,7 @@
     GuideDict = myGuide (args.guideSequence)
     blastlist = blatnInfo(args.blast_tab)
     updateGuide(blastlist, GuideDict, ContigsDict)
-    finalAssembly(GuideDict, args.output)
+    finalAssembly(GuideDict, args.output, args.scaffold_prefix, args.scaffold_suffix)
 
 if __name__ == "__main__":
     __main__()
b
diff -r e279e53a3fde -r 3288cc5a57e5 blast_to_scaffold.xml
--- a/blast_to_scaffold.xml Fri Mar 25 19:14:20 2016 -0400
+++ b/blast_to_scaffold.xml Fri Mar 25 19:21:26 2016 -0400
b
@@ -1,12 +1,14 @@
-<tool id="blast2scaffold" name="blast_to_scaffold" version="0.1.0">
+<tool id="blast2scaffold" name="blast_to_scaffold" version="0.9.0">
 <description>Generate DNA scaffold from blastn or tblastx alignment of Contigs</description>
 <requirements>
 </requirements>
 <command interpreter="python">
         blast_to_scaffold.py --sequences "$sequences"
-                              --guideSequence "$guideSequence"
-                              --blast-tab "$blast_tab"
-                              --output "$output"
+                             --guideSequence "$guideSequence"
+                             --blast-tab "$blast_tab"
+                             --output "$output"
+                             --scaffold_prefix "$sequences.element_identifier"
+                             --scaffold_suffix "$guideSequence.element_identifier"
 </command>
 <inputs>
 <param name="sequences" type="data" format="fasta" label="Select a fasta contigs file"/> 
b
diff -r e279e53a3fde -r 3288cc5a57e5 test-data/assembly.fa
--- a/test-data/assembly.fa Fri Mar 25 19:14:20 2016 -0400
+++ b/test-data/assembly.fa Fri Mar 25 19:21:26 2016 -0400
b
@@ -1,4 +1,4 @@
->Scaffold
+>Scaffold_from_contigs.fa_guided_by_guideSequence.fa
 gcaaaaaggcccctgggGGGGGGTTAATGAGTACTGGAAAAAGAAGCGCGAGATACCACT
 TCGCTGATTATGCTGATTCTGGTATTAAGGATTAGTAGAGTATCGGAAGTGCCGAAGGGA
 ATAATGCTGGTCCGTTGTAAACAGGATACTTATGAGACCTCTTAACAGAAACTTTGAGCA