forked from GMOD/jbrowse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·78 lines (72 loc) · 3.18 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
done_message () {
if [ $? == 0 ]; then
echo " done."
if [ "x$1" != "x" ]; then
echo $1;
fi
else
echo " failed. See setup.log file for error messages." $2
fi
}
echo -n "Installing Perl prerequisites ..."
if ! ( perl -MExtUtils::MakeMaker -e 1 >/dev/null 2>&1); then
echo;
echo "WARNING: Your Perl installation does not seem to include a complete set of core modules. Attempting to cope with this, but if installation fails please make sure that at least ExtUtils::MakeMaker is installed. For most users, the best way to do this is to use your system's package manager: apt, yum, fink, homebrew, or similar.";
fi;
( set -x;
bin/cpanm -v --notest -l extlib/ --installdeps . < /dev/null;
bin/cpanm -v --notest -l extlib/ --installdeps . < /dev/null;
set -e;
bin/cpanm -v --notest -l extlib/ --installdeps . < /dev/null;
) >setup.log 2>&1;
done_message "" "As a first troubleshooting step, make sure development libraries and header files for GD, Zlib, and libpng are installed and try again.";
echo
echo -n "Formatting Volvox example data ...";
( set -e;
set -x;
rm -rf sample_data/json/volvox;
bin/prepare-refseqs.pl --fasta docs/tutorial/data_files/volvox.fa --out sample_data/json/volvox;
bin/biodb-to-json.pl -v --conf docs/tutorial/conf_files/volvox.json --out sample_data/json/volvox;
bin/generate-names.pl -v --out sample_data/json/volvox;
) >>setup.log 2>&1
done_message "To see the example data, browse to http://your.jbrowse.root/index.html?data=sample_data/json/volvox.";
echo
echo -n "Building and installing wiggle format support ...";
(
set -e;
if( [ ! -f bin/wig2png ] ); then
set -x;
cd wig2png;
./configure && make;
cd ..;
fi
set -x;
bin/wig-to-json.pl --wig docs/tutorial/data_files/volvox_microarray.wig --out sample_data/json/volvox;
) >>setup.log 2>&1
done_message "" "Make sure libpng development libraries and header files are installed.";
echo
echo -n "Building and installing BAM format support (samtools and Bio::DB::Sam) ...";
(
set -e;
# try to install samtools
if( perl -Iextlib/lib/perl5 -Mlocal::lib=extlib -MBio::DB::Sam -e 1 ); then
echo Bio::DB::Sam already installed.
else
if( [ "x$SAMTOOLS" == "x" ] ); then
set -x;
if [ ! -e samtools ]; then
svn co https://samtools.svn.sourceforge.net/svnroot/samtools/trunk/samtools;
fi;
make -C samtools -j3 lib;
export SAMTOOLS="$PWD/samtools";
fi
echo "samtools in env at '$SAMTOOLS'";
set +e;
bin/cpanm -v -l extlib Bio::DB::Sam;
set -e;
bin/cpanm -v -l extlib Bio::DB::Sam;
fi
bin/bam-to-json.pl --bam docs/tutorial/data_files/volvox-sorted.bam --tracklabel bam_simulated --key "Simulated next-gen reads" --cssClass basic --clientConfig '{"featureCss": "background-color: #66F; height: 8px", "histCss": "background-color: #88F"}' --out sample_data/json/volvox;
) >>setup.log 2>&1
done_message "" "Try reading the Bio-SamTools troubleshooting guide at https://metacpan.org/source/LDS/Bio-SamTools-1.33/README for help getting Bio::DB::Sam installed.";