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
"<h1>ERROR: incorrect number of sequences found.</h1 | |
<p>Dear user,</p> | |
<p><strong>you requested #{sequenceids.length} sequences</strong> | |
with the following identifiers: <emph>#{sequenceids.join(', ')}</emph>, | |
from the following databases:<emph>#{retrieval_databases.join(', ')}</emph>. | |
</p> | |
<p/> | |
<p><strong>But we found #{found_sequences_count} sequences.</strong>. | |
This is <em>#{found_sequences_count > sequenceids.length ? 'more' : 'less'}</em> | |
sequences than expected.</p> |
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/env ruby | |
# (copy) Yannick Wurm - google me. | |
# All right reserved. | |
help = "Usage: \n" + | |
" #{$0} MySequences_R1.fastq MySequences_R2.fastq > MySequences_R1R2pasted.fastq\n" + | |
"Joins two paired reads into a single megaread. Can be helpful for deduplication.\n" + | |
"The two fastq files must have reads in the same order. Some error checking is performed.\n" | |
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
def YWSystemTools.runMultithreaded(commandArray) | |
# runs commands on N processors at a time - can take more jobs & launches them sequentially. | |
if commandArray.length > 1 | |
$log.info("#{commandArray.length} commands to run") | |
elsif commandArray.length == 1 | |
$log.warn("only one command!") | |
else | |
raise ArgumentError, 'No commands to run!' | |
end |
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
('proc00001'..'proc00024').each do |processor| | |
threads << Thread.new(processor) do |threadid| | |
until commandArray.empty? | |
commandToRun = commandArray.pop | |
$log.info('running:' + commandToRun) | |
## %x[#{commandToRun}] | |
stdout = %x[#{commandToRun}] | |
print(stdout) | |
end | |
end |
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
def YWSystemTools.number_of_processors | |
if RUBY_PLATFORM =~ /linux/ | |
cpuinfo = IO.readlines("/proc/cpuinfo").delete_if{|x| x.index("processor")==nil} | |
return cpuinfo.length | |
elsif RUBY_PLATFORM =~ /darwin/ | |
return `sysctl -n hw.logicalcpu`.to_i | |
elsif RUBY_PLATFORM =~ /win32/ | |
# this works for windows 2000 or greater | |
require 'win32ole' | |
wmi = WIN32OLE.connect("winmgmts://") |
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
def parse(signalp_hash, open_reading_frames_condensed, motif) | |
signalp_with_seq = {} | |
signalp_hash.each do |id, h| | |
current_orf = open_reading_frames_condensed[id] | |
sequence = current_orf.to_s.gsub('["', '').gsub('"]', '') | |
sp_clv = h[0][:cut_off].to_i - 1 | |
signalp = sequence[0,sp_clv] | |
seq_end = sequence[sp_clv+1, sequence.length - (sp_clv+1)] | |
if seq_end.match(/#{motif}/) | |
signalp_with_seq[id + "~- S.P. Cleavage Site: #{sp_clv}:" \ |
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
mkdir converted | |
find . -regex .*mp3 | ruby -pe 'gsub(".mp3", "")' | xargs -I __ ffmpeg -i __.mp3 -ss 0 -t 30 -ac 1 -ab 256000 -f mp4 -acodec libfaac -y __.m4r | |
#important: limit to 30 seconds otherwise iTunes won't transfer it to iphone. | |
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
-bash-4.1$ uname -a | |
Linux sm11 2.6.32-431.1.2.el6.x86_64 #1 SMP Thu Dec 12 13:59:19 CST 2013 x86_64 x86_64 x86_64 GNU/Linux | |
-bash-4.1$ ruby -v | |
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] | |
-bash-4.1$ which ruby | |
~/.rbenv/shims/ruby | |
-bash-4.1$ gem environment | |
RubyGems Environment: | |
- RUBYGEMS VERSION: 1.8.23 | |
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux] |
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
Score Expect Identities Positives Gaps Frame | |
34.97 (70) 0.163 13/27 (48.15%) 19/27 (70.37%) 0/27 (0.00%) (3/-2) | |
Query 111 LVLGLIGNIFLMYYFVKCLLKYFI*KI 191 | |
LVL L+ N+ + YY + CLL YF+ +I | |
Subject 120133 LVLKLVDNLAIYYYIILCLLLYFLIRI 120213 |
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
Failed to load resource: the server responded with a status of 401 (Unauthorized) http://afra.sbcs.qmul.ac.uk/lib/jquery/jquery.js?bust=1409565929178 | |
Uncaught Error: Script error for: jquery | |
http://requirejs.org/docs/errors.html#scripterror require.js:138 | |
Failed to load resource: net::ERR_FAILED chrome-extension://invalid/ | |
less: XHR: Getting 'http://afra.sbcs.qmul.ac.uk/styles.less?bust=1409565929178' lessc.js?bust=1409565929178:6297 | |
less: XHR: Getting 'http://afra.sbcs.qmul.ac.uk/lib/bootstrap/less/variables.less' lessc.js?bust=1409565929178:6297 | |
less: XHR: Getting 'http://afra.sbcs.qmul.ac.uk/lib/bootstrap/less/mixins.less' lessc.js?bust=1409565929178:6297 | |
less: XHR: Getting 'http://afra.sbcs.qmul.ac.uk/lib/bootstrap/less/normalize.less' lessc.js?bust=1409565929178:6297 | |
less: XHR: Getting 'http://afra.sbcs.qmul.ac.uk/lib/bootstrap/less/scaffolding.less' lessc.js?bust=1409565929178:6297 |
OlderNewer