Hi I agree with Roy and had written a very similar script but took a slightly different approach.
I thought it was simpler to use the crunch format for the comparison file but also created a crude match score rather than just using the match length (however I don't know if that was really a good idea + I'm sure there are better ways of generating a score :-) For what it's worth (for use with nucmer --coords output): #!/usr/bin/perl use warnings; use strict; while (<>) { unless ($_ =~ /^(\s*)\d/){next} $_ =~ s/\|//g; my @f = split; # create crude match score = ((length_of_match * %identity)-(length_of_match * (100 - %identity))) /20 my $crude_plus_score=($f[4]*$f[6]); my $crude_minus_score=($f[4]*(100-$f[6])); my $crude_score= int(($crude_plus_score - $crude_minus_score) / 20); # reorganise columns and print crunch format to stdout # score %id S1 E1 seq1 S2 E2 seq2 (description) print " $crude_score $f[6] $f[0] $f[1] $f[7] $f[2] $f[3] $f[8] nucmer comparison coordinates\n" } Andrew -----Original Message----- From: artemis-users-boun...@sanger.ac.uk [mailto:artemis-users-boun...@sanger.ac.uk] On Behalf Of Roy Chaudhuri Sent: 24 April 2009 13:29 To: Subject: Re: [Artemis-users] ACT and MUMMER Hi Alex. It's relative straightforward to parse the "coords" file output by NUCmer/PROmer (which is produced when you specify the --coords flag on the command line), and produce something resembling the BLAST m8 format that ACT expects. Here is some example Perl code for NUCmer: #!/usr/bin/perl use warnings; use strict; while (<>) {last if /^=+/}; while (<>) { $_=~s/\|//g; my @split=split; next if defined $split[9] and $split[9]=~/SHADOWED|DUPLICATE/; print join("\t", @split[7..8], $split[6], $split[4]>$split[5]?$split[4]:$split[5], '#', '#', @split[2..3], @split[0..1], '#', $split[6]), "\n"; } For PROmer you'll need to change the print statement to: print join("\t", @split[11..12], $split[6], $length, '#', '#', @split[2..3], @split[0..1], '#', $split[7]), "\n"; Hope this helps, Roy. Bossers, Alex wrote: > Hello all, > > I am a big fan of artemis and have ported some of my annotation files > automatically to it. > > Currently I am interested in doing multiple genome comparisons. I know > I can use webact or double act to generate big_blast alignments which > should be appropriate for opening in ACT. However, I have been working > with mummer (nucmer in particular) and even though the artemis/act > "manual" tells I should be able to open them I can nowhere find which > files to use (they all seem to fail). Do I need to run mummer with > specific options or do I need a differentparser for that? > > Thanks for any help..... this is already costing me several nights to > find out :-( > > Alex > > > > _______________________________________________ Artemis-users mailing > list Artemis-users@sanger.ac.uk > http://lists.sanger.ac.uk/mailman/listinfo/artemis-users _______________________________________________ Artemis-users mailing list Artemis-users@sanger.ac.uk http://lists.sanger.ac.uk/mailman/listinfo/artemis-users -- Disclaimer: This e-mail and any attachments are confidential and intended solely for the use of the recipient(s) to whom they are addressed. If you have received it in error, please destroy all copies and inform the sender. This email and any attachments are believed to be free from viruses but BBSRC accepts no liability in connection therewith. _______________________________________________ Artemis-users mailing list Artemis-users@sanger.ac.uk http://lists.sanger.ac.uk/mailman/listinfo/artemis-users