This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "bio" | |
filepath = '/media/Store/data/sn15_genes/080611_sn15_aagi_gene.fas' | |
Bio::FlatFile.open(filepath) do |flatfile| | |
flatfile.each do |entry| | |
puts entry.entry_id | |
puts entry.seq | |
puts entry.seq.reverse_complement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Starting script now..." | |
sleep 5m | |
vlc ~/Music/im_going_to_kill_you.mp3 --volume 1024 | |
echo "Script done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%-3.fa: %-1.fa | |
awk '/^>/ { getline s; if ($$3/($$2-$k+1)>=$c) \ | |
{ print $$0 "\n" s } }' $< \ | |
|ABYSS $v -k$k -l$l -e0 -o $@ - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<BlastOutput> | |
<BlastOutput_iterations> | |
<Iteration> | |
<Iteration_query-def>10000_g</Iteration_query-def> | |
<Iteration_hits> | |
<Hit> | |
<Hit_def>hypothetical protein SNOG_01615</Hit_def> | |
<Hit_hsps> | |
<Hsp> | |
<Hsp_score>1420</Hsp_score> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require "xml/libxml" | |
a = XML::Reader.file(ARGV.shift) | |
while a.read | |
node = a.node | |
if node.name == "Iteration" | |
iteration = XML::Document.string(node.to_s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We start with something like | |
# >1_1 [17 - 52] 53 8 | |
# We want to end up with something like | |
# >Pmm_orf_00001_00001|Pmm_orf_00001_00001 17-52 [Phoma medicaginis var. medicaginis] | |
# Get rid of the length and coverage info (the '55 8' in the example above) | |
awk '/^>/ {print $1, $2, $3, $4} /^[^>]/ {print}' OMT5_6frame.fa > nojunk.fasta | |
# Remove the brackets and underscore | |
sed -e 's/\[\|\]//g' -e 's/_/ /g' nojunk.fasta > minimal.fasta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN {FS="_"} | |
/^>/ {printf ">PmpT_%05d.1|PmpT_%05d hypothetical protein [Phoma medicaginis var. medicaginis]\n", substr($1,2), substr($1,2)} | |
/^[^>]/ {print} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^>/ {printf ">foxy19911_scaf_%05d_length_%d\n", substr($1,2), $2} | |
/^[^>]/ {print} | |
# See explanation here: http://picasaweb.google.com/lh/photo/iwAxZYVX1J4yuckbjBCGyg?feat=directlink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'bio' | |
Bio::Blast.reports(ARGF) do |report| | |
query_name = report.query_def | |
top_hit = report.hits.max {|one,two| one.bit_score <=> two.bit_score } | |
puts "#{query_name}\t#{top_hit.target_def}\t#{top_hit.evalue}\t#{top_hit.bit_score}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> // include the LiquidCrystal library | |
// definitions of program states | |
#define READY 0 | |
#define ACTIVE 1 | |
#define FINISHED 2 | |
int progState = 0; | |
// variable declaration |
OlderNewer