-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsourceme.bash
103 lines (87 loc) · 2.82 KB
/
sourceme.bash
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# Copyright (c) 2017 10x Genomics, Inc. All rights reserved.
#
# Environment setup for package cellranger-2.1.1.
# Source this file before running.
#
# Determine path to this script; resolve symlinks
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" > /dev/null && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
DIR="$( cd -P "$( dirname "$SOURCE" )" > /dev/null && pwd )"
#
# Source user's own environment first.
#
# Only source .bashrc if we're being sourced from shell10x script.
# Otherwise, we could end up in an infinite loop if user is
# sourcing this file from their .bashrc.
# Note: .bash_profile is for login shells only.
if [ ! -z $_RUN10X ] && [ -e ~/.bashrc ]; then
source ~/.bashrc
fi
#
# Modify the prompt to indicate user is in 10X environment.
#
if [ ! -z $_10X_MODPROMPT ]; then
ORIG_PROMPT=$PS1
PREFIX=$TENX_PRODUCT
if [ ! -z $_10XDEV_BRANCH_PROMPT ]; then
PREFIX="10X:\`pushd $(echo $MROPATH | cut -d : -f1) > /dev/null;git rev-parse --abbrev-ref HEAD;popd > /dev/null\`"
fi
export PS1="\[\e[0;34m\]$PREFIX\[\e[m\]>$ORIG_PROMPT"
fi
#
# Set aside environment variables if they may conflict with 10X environment
#
if [ -z "$_TENX_LD_LIBRARY_PATH" ]; then
export _TENX_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH=""
fi
#
# Unset environment variables if they may conflict with 10X environment
#
if [ ! -z "$PYTHONPATH" ]; then
unset PYTHONPATH
fi
#
# Add module binary paths to PATH
#
if [ -z "$PATH" ]; then
export PATH="$DIR/STAR/5dda596"
else
export PATH="$DIR/STAR/5dda596:$PATH"
fi
export PATH="$DIR/martian-cs/2.3.2/bin:$PATH"
export PATH="$DIR/lz4/v1.8.0:$PATH"
export PATH="$DIR/cellranger-cs/2.1.1/bin:$PATH"
export PATH="$DIR/cellranger-cs/2.1.1/tenkit/bin:$PATH"
export PATH="$DIR/cellranger-cs/2.1.1/tenkit/lib/bin:$PATH"
export PATH="$DIR/cellranger-cs/2.1.1/lib/bin:$PATH"
export PATH="$DIR/miniconda-cr-cs/4.3.21-miniconda-cr-cs-c9/bin:$PATH"
export PATH="$DIR/cellranger-tiny-ref/1.2.0:$PATH"
export PATH="$DIR/cellranger-tiny-fastq/1.2.0:$PATH"
export PATH="$DIR/samtools_new/1.6:$PATH"
#
# Module-specific env vars
#
# martian-cs
if [ -z "$PYTHONPATH" ]; then
export PYTHONPATH="$DIR/martian-cs/2.3.2/adapters/python"
else
export PYTHONPATH="$DIR/martian-cs/2.3.2/adapters/python:$PYTHONPATH"
fi
# cellranger-cs
export MROFLAGS="--vdrmode=rolling"
export LC_ALL="C"
export MROPATH="$DIR/cellranger-cs/2.1.1/mro"
if [ -z "$MROPATH" ]; then
export MROPATH="$DIR/cellranger-cs/2.1.1/tenkit/mro"
else
export MROPATH="$DIR/cellranger-cs/2.1.1/tenkit/mro:$MROPATH"
fi
export PYTHONPATH="$DIR/cellranger-cs/2.1.1/lib/python:$PYTHONPATH"
export PYTHONPATH="$DIR/cellranger-cs/2.1.1/tenkit/lib/python:$PYTHONPATH"
export PYTHONUSERBASE="$DIR/cellranger-cs/2.1.1/lib"