Permalink
Browse files

Generate synteny coordinates

Signed-off-by: Michael Barton <mail@michaelbarton.me.uk>
  • Loading branch information...
1 parent 4d36f29 commit 671285914059195bab83fbfc79b81bd530131a4b @michaelbarton committed Apr 3, 2013
Showing with 4,974 additions and 1 deletion.
  1. +10 −0 Makefile
  2. +8 −0 bin/align
  3. +1 −1 bin/fasta
  4. +4,955 −0 synteny.tab
View
@@ -1,3 +1,13 @@
+#all: gene_density.eps dot_plot.eps
+
+synteny.tab: bin/align genomes/.fasta
+ ls $(dir $(lastword $^))**/**/genome.fna \
+ | grep "pf01\|sbw25\|pf5" \
+ | parallel $< genomes/fluorescens/r124/genome.fna {}
+ sleep 1
+ cat *.coords | sort > $@
+ rm *.coords *.delta
+
genomes/.fasta: bin/fasta genomes/.decompressed
ls $(dir $(lastword $^))**/**/genome.gb | parallel $<
touch $@
View
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+
+query, reference = ARGV
+
+ref = reference.gsub('.fna','').split('/')[-3,2].join('_')
+
+`nucmer --prefix=#{ref} --maxmatch #{reference} #{query} 2> /dev/null`
+`show-coords -THr #{ref}.delta > #{ref}.coords`
View
@@ -10,7 +10,7 @@ species, strain = in_file.gsub('.gb','').split('/')[-3,2]
File.open(out_file,'w') do |out|
dna = Bio::FlatFile.auto(in_file).first.to_biosequence
- out.print dna.output(:fasta,:header => species + '_' + strain)
+ out.print dna.output(:fasta,:header => strain)
end
exit
Oops, something went wrong.

0 comments on commit 6712859

Please sign in to comment.