<commit_before>#!/bin/bash
# AUTHOR: <NAME> <<EMAIL>>


#########################################################################
ANALYSIS_PATH=APRICOT_analysis
APRICOT_PATH=APRICOT
ROOT_DB_PATH=source_files
NEEDLE_EMBOSS_PATH=source_files/reference_db_files/needle/emboss/needle
#########################################################################


#########################################################################
# Either use the dev version in the git repo with the defaul Python
# version
APRICOT_CALL="../bin/apricot"

# ... or set a Python version for that call ...
# PYTHON_PATH=python3
# APRICOT_CALL="$APRICOT_PATH/bin/apricot"    #"python3 ../bin/apricot"

# ... or use the installed version of apricot
# APRICOT_CALL="apricot"

#########################################################################


#########################################################################
# FIXED PATHS for flatfiles downloaded by APRICOT
DB_PATH=$ROOT_DB_PATH/reference_db_files

# Path for domain databases
CDD_PATH=$DB_PATH/cdd/Cdd
INTERPRO_PATH=$DB_PATH/interpro/interproscan
#########################################################################


#########################################################################
# External tool's path for additional annotation: PLEASE ADAPT THIS
# PATH
raptorx_tool_path=$DB_PATH/raptorx
# run_raptorx-ss3.pl 
# ss8 script is for 8 state and ss3 script is for 3 state structure prediction
raptorx_perl_script=raptorx-ss3-ss8/bin/run_raptorx-ss8.pl
raptorx_path=$raptorx_tool_path/$raptorx_perl_script

export LD_LIBRARY_PATH=/usr/local/lib64
export PSORT_ROOT=/opt/biotools/psortb/psort/bin
export PSORT_PFTOOLS=/opt/biotools/pftools
#########################################################################


#########################################################################
# *OPTIONAL*. Provide species name to retrieve taxonomy IDS for given
# species
species='coli'
#########################################################################


#######################################################################
# Input-1, option 1: provide comma separated list of UniProt ids
#
# * P0A6X3 (positive test) is Hfq protein that contains sm and RRM/RNP
#   like domain
# * P00957 (negative test) is alaS protein is a tRNA-ligase, hence
#   will not be selected by RRM, KH or DEAD domains
QUERY_UIDS='P0A6X3,P00957'
#######################################################################


######################################################################
# Not used in the demonstration file

# Input-1, option 2: provide comma separated list of gene ids or gene
# name
query_geneids=''

# Input-1, option 3: users can pick a taxonomy id from option 1a
# (source_files/selected_taxonomy_ids.txt), or directly provide it
# when the taxonomy id is known
tax_id=''

# Input-1, option 4: provide absolute path of for query fasta sequence
# default fasta path
# $ANALYSIS_PATH/input/mapped_query_annotation/fasta_path_mapped_query
FASTA_PATH=$ANALYSIS_PATH/input/mapped_query_annotation/fasta_path_mapped_query
    
# Input-2: Keywords, *REQUIRED* for domain selection and *OPTIONAL*
# for classification This can be altered by the users in the
# demonstration file as well
domain_kw='RRM,KH,DEAD'

# *REQUIRED* Input-2, comma separated list of keywords for domain
# *selection
class_kw='ribosom,helicase,synthetase,polymerase,transferase,nuclease,RRM,RNP'
######################################################################
    
main(){
    
    set_up_analysis_folder			            ### Set up analysis folders for APRICOT analysis

    ### Install databases and third-party tools required by APRICOT
    # install_minimum_required_files            ### Optionally use 'install_complete_db_and_tools', that will install all the third-party tools for additional annotation

    ### Test APRICOT without installing databases and the third-party tools
    ## this test is only for query uids: P0A6X3,P00957
    ## additional annotation is not allowed with this option
    work_with_test_files			            ### Copies small demo files from GitHub
    
    ### This step could be skipped if using uniprot ids as queries<commit_msg>Update system_test.sh<commit_after>#!/bin/bash
# AUTHOR: <NAME> <<EMAIL>>

## Assumes that users have Java installed, it is required to run InterproScan

#########################################################################
ANALYSIS_PATH=APRICOT_analysis
APRICOT_PATH=APRICOT
ROOT_DB_PATH=source_files
NEEDLE_EMBOSS_PATH=source_files/reference_db_files/needle/emboss/needle
#########################################################################

#########################################################################
# Either use the dev version in the git repo with the default Python version
# or install via pip (pip3 install bio-apricot)
APRICOT_CALL="apricot"

# ... or set a Python version for that call ...
# PYTHON_PATH=python3
# APRICOT_CALL="$APRICOT_PATH/bin/apricot"    #"python3 ../bin/apricot"

# ... or use the installed version of apricot
# APRICOT_CALL="apricot"

#########################################################################


#########################################################################
# FIXED PATHS for flatfiles downloaded by APRICOT
DB_PATH=$ROOT_DB_PATH/reference_db_files

# Path for domain databases
CDD_PATH=$DB_PATH/cdd/Cdd
INTERPRO_PATH=$DB_PATH/interpro/interproscan
#########################################################################


#########################################################################
# External tool's path for additional annotation: PLEASE ADAPT THIS
# PATH
raptorx_tool_path=$DB_PATH/raptorx
# run_raptorx-ss3.pl 
# ss8 script is for 8 state and ss3 script is for 3 state structure prediction
raptorx_perl_script=raptorx-ss3-ss8/bin/run_raptorx-ss8.pl
raptorx_path=$raptorx_tool_path/$raptorx_perl_script

export LD_LIBRARY_PATH=/usr/local/lib64
export PSORT_ROOT=/opt/biotools/psortb/psort/bin
export PSORT_PFTOOLS=/opt/biotools/pftools
#########################################################################


#########################################################################
# *OPTIONAL*. Provide species name to retrieve taxonomy IDS for given
# species
species='coli'
#########################################################################


#######################################################################
# Input-1, option 1: provide comma separated list of UniProt ids
#
# * P0A6X3 (positive test) is Hfq protein that contains sm and RRM/RNP
#   like domain
# * P00957 (negative test) is alaS protein is a tRNA-ligase, hence
#   will not be selected by RRM, KH or DEAD domains
QUERY_UIDS='P0A6X3,P00957'
#######################################################################


######################################################################
# Not used in the demonstration file

# Input-1, option 2: provide comma separated list of gene ids or gene
# name
query_geneids=''

# Input-1, option 3: users can pick a taxonomy id from option 1a
# (source_files/selected_taxonomy_ids.txt), or directly provide it
# when the taxonomy id is known
tax_id=''

# Input-1, option 4: provide absolute path of for query fasta sequence
# default fasta path
# $ANALYSIS_PATH/input/mapped_query_annotation/fasta_path_mapped_query
FASTA_PATH=$ANALYSIS_PATH/input/mapped_query_annotation/fasta_path_mapped_query
    
# Input-2: Keywords, *REQUIRED* for domain selection and *OPTIONAL*
# for classification This can be altered by the users in the
# demonstration file as well
domain_kw='RRM,KH,DEAD'

# *REQUIRED* Input-2, comma separated list of keywords for domain
# *selection
class_kw='ribosom,helicase,synthetase,polymerase,transferase,nuclease,RRM,RNP'
######################################################################
    
main(){
    
    set_up_analysis_folder			            ### Set up analysis folders for APRICOT analysis

    ### Install databases and third-party tools required by APRICOT
    ### Docker image can be pulled: docker pull malvikasharan/apricot
    ### Optionally install all the third-party tools for additional annotation
    ### using functions: install_minimum_required_files (doesn't install Psortb and Raptorx)
    ### or install_complete_db_and_tools (installs complete filesystem)

    ### Test APRICOT without installing databases and the third-party tools
    ## this test is only for query uids: P0A6X3,P00957
    ## additional annotation is not allowed with this option
    work_with_test_files			            ### Copies small demo files from GitHub
    
    ### This step could be skipped if using uniprot ids as queries
{'fraction_non_alphanumeric': 0.29170024174053183, 'fraction_numerical': 0.010935881201795786, 'mean_word_length': 6.306980656013456, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4585844', 'n_tokens_mistral': 2531, 'n_tokens_neox': 2325, 'n_words': 669}