# HG changeset patch # User dereeper # Date 1624309857 0 # Node ID 90611c479c08759741e3ca1462560ea9e82eeb9b Uploaded diff -r 000000000000 -r 90611c479c08 ragoo.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ragoo.pl Mon Jun 21 21:10:57 2021 +0000 @@ -0,0 +1,58 @@ +#!/usr/bin/perl + +use strict; + +my $scaffolds= $ARGV[0]; +my $reference = $ARGV[1]; +my $output = $ARGV[2]; +my $output2 = $ARGV[3]; + +my $tmpdir = "tmpdir$$"; + +mkdir($tmpdir); + + +my ($sc) = split(",",$scaffolds); +$scaffolds = $sc; + +system("cp -rf $scaffolds $tmpdir/scaffolds.fa"); +system("cp -rf $reference $tmpdir/reference.fa"); +chdir($tmpdir); +system("ragoo.py scaffolds.fa reference.fa"); + + +my %hash; +my $id; +open(F,"ragoo_output/ragoo.fasta"); +while(){ + if (/>(.*)/){$id = $1;} + else{ + $hash{$id}.= $_; + } +} +close(F); + +open(O,">$output"); +foreach my $id(keys(%hash)){ + print O ">$id\n"; + my $seq = $hash{$id}; + for (my $i =0; $i <= length($seq); $i =$i+80){ + my $subseq = substr($seq,$i,80); + print O "$subseq\n"; + } +} +close(O); + +open(O,">$output2"); +foreach my $id(keys(%hash)){ + if ($id =~/Chr0_RaGOO/){ + next; + } + print O ">$id\n"; + my $seq = $hash{$id}; + for (my $i =0; $i <= length($seq); $i =$i+80){ + my $subseq = substr($seq,$i,80); + print O "$subseq\n"; + } +} +close(O); diff -r 000000000000 -r 90611c479c08 ragoo.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ragoo.xml Mon Jun 21 21:10:57 2021 +0000 @@ -0,0 +1,31 @@ + + Order and assign scaffolds + + ragoo + + + perl ${__tool_directory__}/ragoo.pl $input $reference $output $output2 + + + + + + + + + + + + + + + + For full documentation, please go to the RaGOO website : https://github.com/malonge/RaGOO + + + + + 10.1186/s13059-019-1829-6 + + +