Skip to content

Instantly share code, notes, and snippets.

View mdondrup's full-sized avatar

Michael Dondrup mdondrup

  • University of Bergen
  • Bergen, Norway
View GitHub Profile
diff --git a/code/Makefile.complete b/code/Makefile.complete
index 39787e9..3f451fc 100644
--- a/code/Makefile.complete
+++ b/code/Makefile.complete
@@ -24,12 +24,12 @@ SHELL = /bin/sh
# Global external software directory.
# If not set in your .cshrc, then set it here. <---
-#FREEWAREDIR = /usr/local
+FREEWAREDIR = /opt/local/lib
#!/usr/bin/env perl
use strict;
use warnings;
my %h = ();
my $range = 5; # configures the maximum distance
keys(%h) = 72553; # pre-size hash to number of expected entries, should not be too large
# read file into a hash first,
# we don't trust the sorting order of the file,
# if that uses too much memory, the file needed to
# be sorted by species name and the code adapted
@mdondrup
mdondrup / getLCA.pl
Last active September 11, 2023 07:34
#!/usr/bin/env perl
#### This is now becoming a flexible and chaotic Taxonomy tool ;)
use strict;
use warnings;
use Bio::DB::Taxonomy;
use Bio::Taxonomy::Taxon;
use Carp qw |confess croak|;
use Cwd qw |cwd|;
my @nodes = ();
#!/bin/sh
set -u
# usage: fetchAllGenomesByTaxon.sh Daphnia_pulex Lepeophtheirus_salmonis
# either use quotes or underscores
# This is just to show how to define the taxon list inline if you don't want to read taxa from the command line
#TAXLIST=("Daphnia pulex" "Drosophila melanogaster" "Anopheles gambiae" "Pediculus humanus"
#"Ixodes scapularis" "Apis mellifera" "Bombyx mori")
#TAXLIST=("Strigamia maritima")
#NEXUS
begin trees;
tree con_50_majrule = [&R] ((((((((((((((((((((((Labidocera_madurae_1[&prob=1.0,prob_stddev=0.0,prob_range={1.0,1.0},prob(percent)="100",prob+-sd="100+-0",length_mean=0.166643674,length_median=0.164812,length_95%HPD={0.1180838,0.2164805}]:0.164812,Acartia_tonsa_1-671[&prob=1.0,prob_stddev=0.0,prob_range={1.0,1.0},prob(percent)="100",prob+-sd="100+-0",length_mean=0.302123099,length_median=0.3009545,length_95%HPD={0.2401692,0.3654234}]:0.300955)[&prob=0.639240506,prob_stddev=0.0409848701,prob_range={0.610259827,0.668221186},prob(percent)="64",prob+-sd="64+-4",length_mean=0.049391263,length_median=0.04855907,length_95%HPD={0.01660929,0.08581556}]:0.048559,Temora_stylifera_1-5[&prob=1.0,prob_stddev=0.0,prob_range={1.0,1.0},prob(percent)="100",prob+-sd="100+-0",length_mean=0.168450561,length_median=0.1679979,length_95%HPD={0.123615,0.2214194}]:0.167998)[&prob=0.943037975,prob_stddev=0.0230834326,prob_range={0.926715523,0.959360426},prob(percent)="94",prob+-sd="94+-2",length_mean=0.0431809188,l
MODEL 1
ATOM 1 C1 UNK 1 46.878 21.312-121.026 1.00 0.00 C
ATOM 2 C2 UNK 1 46.008 21.716-122.189 1.00 0.00 C
ATOM 3 C3 UNK 1 46.381 22.574-123.243 1.00 0.00 C
ATOM 4 C4 UNK 1 47.629 23.170-123.351 1.00 0.00 C
ATOM 5 C5 UNK 1 47.990 24.006-124.415 1.00 0.00 C
ATOM 6 N1 UNK 1 47.231 24.376-125.447 1.00 0.00 N
ATOM 7 C6 UNK 1 47.918 25.174-126.264 1.00 0.00 C
ATOM 8 C7 UNK 1 47.497 25.776-127.450 1.00 0.00 C
ATOM 9 C8 UNK 1 46.216 25.625-127.970 1.00 0.00 C
library(Rpdb)
library(pdist)
#mypdb <- read.pdb("SCARB_S361384_results_itasser/1dve-rmsd.pdb", HETATM = T, ATOM = T, MODEL = 1:2)
my.pdist <- function(x,y) {
ret <- as.matrix(pdist(x,y), nrow = nrow(x), ncol=nrow(y))
dimnames(ret) <- list(row.names(x), row.names(y))
return(list(ret))
#!/usr/bin/env perl
use strict;
use warnings;
use Bio::Tools::GFF;
use Bio::SeqFeatureI;
my %fstore1 = ();
my %fstore2 = ();
my %conflicts = ();
CURDIR=`pwd`
LOGFILE=$CURDIR/macsysfinder-install.log # give the logfile a proper name
# if [ -e $LOGFILE ]; then rm $LOGFILE ; fi # no need to delete the file each time
mkdir -p bin
mkdir -p src
#install vmatch
echo " downloading and compiling of Vmatch" >> $LOGFILE
echo "change directory to $CURDIR/src" >> $LOGFILE
cd src
#!/bin/sh
set -eu
# WARNING: you need to adapt the dependency list first
#
# shell script allowing to install all CRISPRCasFinder.pl-v4.2's dependencies
#
# same version than CRISPRCasFinder.pl, here 4.2.17
# authors: David Couvin, Fabrice Leclerc, Claire Toffano-Nioche
# adapted to non sudo install by M. Dondrup