Skip to content

Instantly share code, notes, and snippets.

View decodebiology's full-sized avatar
🎯
Focusing

Santhilal Subhash decodebiology

🎯
Focusing
View GitHub Profile
@decodebiology
decodebiology / EnsemblGTFtoAnnotation.sh
Last active June 29, 2018 12:18
Convert EnsEMBL GTF to Annotation table (Geneid, GeneSymbol, GeneWiseChrLocation, GeneClass, Strand)
echo `date`;
dir=(`dirname $1`)
base=(`basename $1`)
echo "1/7 Preparing files";
cat $1 | sed 's/ "/\t/g' | sed 's/"; /\t/g' | cut -f1,4,5,7,10,12,16,18,22 | sed 's/";//' | awk '!x[$6]++' | awk '{print $6"\t"$0;}' > $dir/enst_annotation.tmp;
# Bland-Altman plot R function.
# Author: jmmateos@mce.hggm.es
baplot <- function(m1, m2, ...) {
# m1 and m2 are the measurements
means <- (m1 + m2) / 2
diffs <- m1 - m2
mdiff <- mean(diffs)
sddiff <- sd(diffs)
# Compute the figure limits