File: act

package info (click to toggle)
artemis 18.2.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,380 kB
  • sloc: java: 136,224; xml: 3,360; sh: 1,283; perl: 83; sql: 47; makefile: 28
file content (92 lines) | stat: -rwxr-xr-x 3,209 bytes parent folder | download | duplicates (4)
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
#!/bin/bash -

#
# This script will start ACT on a UNIX system.
#

QUIET=no

usage () {
	echo "SYNOPSIS"
	echo "       Artemis Comparison Tool (ACT): Genome Comparison Tool"
	echo "USAGE"
	echo "        $0 [options] <SEQUENCE_1> <COMPARISON_1_2> <SEQUENCE_2> ..."
	echo "OPTIONS"
	echo "        SEQUENCE                   An EMBL, GenBank, FASTA, or GFF3 file"
	echo "        FEATURE                    An Artemis TAB file, or GFF file"
	echo "        COMPARISON                 A BLAST comparison file in tabular format"
	echo
	echo "        -options FILE              Read a text file of options from FILE"
	echo "        -chado                     Connect to a Chado database (using PGHOST, PGPORT, PGDATABASE, PGUSER environment variables)"
	echo
	echo "        -Dblack_belt_mode=?         Keep warning messages to a minimum [true,false]"
	echo "        -DuserplotX=FILE[,FILE2]    For sequence 'X' open one or more userplots"
	echo "        -DloguserplotX=FILE[,FILE2] For sequence 'X' open one or more userplots, take log(data)"
	echo "        -DbamX=FILE[,FILE2,...]     For sequence 'X' open one or more BAM, CRAM, VCF, or BCF files"
	echo "        -Dchado=\"h:p/d?u\"           Get ACT to open this CHADO database"
	echo "        -Dread_only                 Open CHADO database read-only"
	echo "EXAMPLES"
	echo "        % act"
	echo "        % act af063097.embl af063097_v_b132222.crunch b132222.embl"
	echo "        % act -Dblack_belt_mode=true -Dbam1=MAL_0h.bam -Dbam2=MAL_7h.bam,var.raw.new.bcf"
	echo "        % act -Duserplot2=/pathToFile/userPlot"
	echo
	echo "HOMEPAGE"
	echo "        http://www.sanger.ac.uk/science/tools/artemis-comparison-tool-act"
    echo   
    
    exit 0
}

# Special Sanger override on chado PGUSER
if [[ "$ARTEMIS_SANGER_DBUSER" != "" ]]
then
	export PGUSER=$ARTEMIS_SANGER_DBUSER
fi

#
# Parse arguments.
#
APPLICATION_PROPERTIES="-Djdbc.drivers=org.postgresql.Driver -Dartemis.environment=UNIX $SANGER_ARTEMIS_OPTIONS"
while test $# != 0
do
    case $1 in
	    -options)   APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dextra_options=$2"; shift ;;
	    -chado)     APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dchado=$PGHOST:$PGPORT/$PGDATABASE?$PGUSER -Dibatis" ;;
	    -D*)        APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES $1" ;;
	    -quiet)     QUIET=yes ; APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Drun_quietly=true" ;;
	    -help)      usage ;;
	    --help)     usage ;;
	    -h)         usage ;;
	    *)          break ;;
    esac
    shift
done

#
# "-mx2g" sets the maximum amount of memory to use. 
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
then
    FLAGS="-mx2g -ms100m -noverify"
else
    FLAGS="$ARTEMIS_JVM_FLAGS -noverify"
fi

#
# Temporary flags to avoid Java 9+ reflection warnings being written to the terminal.
# Should not be necessary when Ibatis is replaced.
#
FLAGS="$FLAGS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED"

if [[ "$QUIET" = no ]]
then
    echo "Starting ACT with arguments: $FLAGS $APPLICATION_PROPERTIES $*"
fi

java $FLAGS $APPLICATION_PROPERTIES -jar /usr/share/java/act.jar $*
result=$?

exit $result