Skip to content

Commit

Permalink
Simple build script
Browse files Browse the repository at this point in the history
  • Loading branch information
mikessh committed Mar 9, 2016
1 parent e613afd commit 1136a60
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mkdir database/
cd src/
python build_db.py
Rscript db_summary.R | tee ../database/vdjdb.summary.txt
cd ..

STAMP=`date +%Y-%m-%d`-`git rev-parse --short HEAD`

cd database/
cp ../metadata/vdjdb.meta.txt vdjdb.meta.txt
cp ../LICENSE.txt LICENSE.txt
zip -r vdjdb-$STAMP.zip vdjdb.meta.txt vdjdb.txt LICENSE.txt
File renamed without changes.
28 changes: 28 additions & 0 deletions src/db_summary.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
df <- read.table("../database/vdjdb.txt", header=T, sep="\t")

df$comment <- NULL

cat("Summary:\n")
str(df)
summary(df)

cat("Species:\n")
cat(levels(df$species), "\n")

cat("Ag-species:\n")
cat(levels(df$antigen.species), "\n")
cat("Ag-genes:\n")
cat(levels(df$antigen.gene), "\n")

cat("MHC-A:\n")
cat(levels(df$mhc.a), "\n")
cat("MHC-B:\n")
cat(levels(df$mhc.b), "\n")

cat("References:\n")
cat(levels(df$reference.id), "\n")

cat("Last record id:\n")
cat(as.character(sort(df$record.id, decreasing = T)[1]), "\n")
cat("Last complex id:\n")
cat(as.character(sort(df$complex.id, decreasing = T)[1]), "\n")

0 comments on commit 1136a60

Please sign in to comment.