I hereby claim:
- I am yannickwurm on github.
- I am yannickwurm (https://keybase.io/yannickwurm) on keybase.
- I have a public key ASAc2uIUfWuRgyD_pL3W24qhH4QIrd41fz8nqpUiuzSzIAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Create authentification token on github
cd to somewhere with some space.
The following
ACCESS_TOKEN=theSetOfLettersAndNumbersInGithubAuthentificationToken
curl -s "https://api.github.com/orgs/wurmlab/repos?page=1&per_page=100&type=private&access_token=$ACCESS_TOKEN" | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'| ants_fyi <- read.table("https://bit.ly/antsofuk") | |
| colnames(ants_fyi) <- c("genus", "species") | |
| nrow(ants_fyi) | |
| head(ants_fyi) | |
| play_guess_the_genus <- function() { | |
| ants <- read.table("https://bit.ly/antsofuk") | |
| colnames(ants) <- c("genus", "species") | |
| score <- 0 | |
| attempts <- 0 |
| egrep '^@' in.fq | cut -f 1 -d ' ' | sort | uniq -c > in.fq.counts | |
| cat in.fq.counts | egrep " 1 " | ruby -pe 'gsub(/ +1 @/, "")' > in.fq.orphan_ids | |
| cat in.fq.counts | egrep " 2 " | ruby -pe 'gsub(/ +2 @/, "")' > in.fq.paired_ids | |
| then subseq |
| 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}:" \ |
| 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://") |
| ('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 |
| 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 |
| #!/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" | |
| # from https://en.wikipedia.org/wiki/List_of_ants_of_Great_Britain - unclear how reliable | |
| Anergates atratulus | |
| Camponotus sp. | |
| Crematogaster scutellaris | |
| Formica aquilonia | |
| Formica cunicularia | |
| Formica exsecta | |
| Formica fusca | |
| Formica lemani | |
| Formica lugubris |