-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.sh
executable file
·53 lines (44 loc) · 1.73 KB
/
index.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
#!/usr/bin/env bash
######################################################################
# PUBLIC DOMAIN NOTICE
#
# This software is "United States Government Work" under the terms of the United
# States Copyright Act. It was written as part of the authors' official duties
# for the United States Government and thus cannot be copyrighted. This software
# is freely available to the public for use without a copyright
# notice. Restrictions cannot be placed on its present or future use.
#
# Although all reasonable efforts have been taken to ensure the accuracy and
# reliability of the software and associated data, the National Human Genome
# Research Institute (NHGRI), National Institutes of Health (NIH) and the
# U.S. Government do not and cannot warrant the performance or results that may
# be obtained by using this software or data. NHGRI, NIH and the U.S. Government
# disclaim all warranties as to performance, merchantability or fitness for any
# particular purpose.
#
# Please cite the authors in any work or product based on this material.
######################################################################
SCRIPT_PATH=`cat scripts`
source ~/.profile
if [ -e `pwd`/CONFIG ]; then
CONFIG=`pwd`/CONFIG
else
CONFIG=${SCRIPT_PATH}/CONFIG
fi
LD_ADDITION=`cat $CONFIG |grep -v "#" |grep LD_LIBRARY_PATH |wc -l`
if [ $LD_ADDITION -eq 1 ]; then
LD_ADDITION=`cat $CONFIG |grep -v "#" |grep LD_LIBRARY_PATH |tail -n 1 |awk '{print $NF}'`
export LD_LIBRARY_PATH=$LD_ADDITION:$LD_LIBRARY_PATH
fi
wrk=`pwd`
syst=`uname -s`
arch=`uname -m`
name=`uname -n`
if [ "$arch" = "x86_64" ] ; then
arch="amd64"
fi
prefix=`cat prefix`
asm=`cat asm`
# index the assembly
minimap2 -ax map-pb -d $prefix.mmi $asm
samtools faidx $asm