# HG changeset patch # User rnateam # Date 1436099872 14400 # Node ID bc25ba9d9fcf557526336490b4a1d76303ef20f6 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/hacked/splitFasta commit fcd6ef7e59971abd6b6a3a5401f92bcdef6ef76c diff -r 000000000000 -r bc25ba9d9fcf splitFasta.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/splitFasta.py Sun Jul 05 08:37:52 2015 -0400 @@ -0,0 +1,14 @@ +import sys, os +if __name__ == "__main__": + #assuming perfect input, read every two lines + inpath = sys.argv[1] + file_contents = open(inpath, 'r').readlines() + os.makedirs('splits') + inname = os.path.basename(inpath) + for i in range(0, len(file_contents), 2): + headline = file_contents[i] + outname = headline[1:headline.index(' ')]+'.fa' + outfile = open(os.path.join('splits',outname), 'w') + outfile.write(file_contents[i]) + outfile.write(file_contents[i+1]) + outfile.close() diff -r 000000000000 -r bc25ba9d9fcf splitfasta.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/splitfasta.xml Sun Jul 05 08:37:52 2015 -0400 @@ -0,0 +1,23 @@ + + + + + + + + + blah + ]]> + + + + + + + + + +