<commit_before>BiGSMAll
============

# BiGSMAll(BacterIal Genome-Scale Metabolic models for AppLied reverse ecoLogy)
# Python scripts and workflow by <NAME>, University of Michigan, 2014 - 2016

#----------------------------------------------------------------------------------------------------------#

# The function of this package is to observe putative metabolic requirements, interaction, and activity of bacteria
#	with the intention of inferring ecological interaction
# KEGG reference files and reference creation script can be found in the support directory
# Examples of input files for each program can be found in the examples directory

#----------------------------------------------------------------------------------------------------------#

# Index:
# Section 1:  Generating bipartite metabolic models used in conjunction with transcriptomics
# Section 2:  Generating SCC networks of compounds only to derive source and sink lists
# Section 3:  Comparing source and sink compounds to infer ecological interaction
# Section 4:  Appendix describing example files for each script

#----------------------------------------------------------------------------------------------------------#

# Section 1 - bipartite_graph.py
# Bipartite graphs 
# Calculates relative importance of a given metabolite based on the expression of surrounding enzymes in a metabolic network

# Basic usage:
python bipartite_graph.py ko_expression.list

# Additional Options:
usage: bipartite_graph.py [-h] [--name NAME] [--min MIN] [--degree DEGREE]
                          [--iters ITERS]
                          input_file

Generate bipartite metabolic models and calculates importance of substrate nodes
based on gene expression.

positional arguments:
  input_file

optional arguments:
  -h, --help       show this help message and exit
  --name NAME      Organism or other name for KO+expression file (default is
                   organism)
  --min MIN        minimum importance value to report
  --degree DEGREE  minimum degree value to report
  --iters ITERS    iterations for random distribution subsampling
  
#----------------------------------------------------------------------------------------------------------#

# Section 2 - scc_graph.py
# SCC networks
# Purpose is to calculate seeds compounds to genome-scale metabolic networks according to KEGG annotation
# SCC algorithm from B<NAME> al. (2008). Large-scale reconstruction and phylogenetic analysis of metabolic environments.

# Basic usage:
python scc_graph.py ko.list

# Additional Options:
usage: scc_graph.py [-h] [--giant GIANT] [--component COMPONENT]
                    [--confidence CONFIDENCE]
                    newfile

Calculate set seeds from KO lists.

positional arguments:
  newfile

optional arguments:
  -h, --help            show this help message and exit
  --giant GIANT         Only focus on the largest component or not
  --component COMPONENT
                        Minimum threshold for SCC size to be included
  --confidence CONFIDENCE
                        Minimum confidence value allowed for seeds

#----------------------------------------------------------------------------------------------------------#

# Section 3 - interact_scc.py
# Calculating the interaction indices between seed files of 2 organisms
# This refers to the directories of files generated by scc_graph.py
# Interaction metrics from <NAME>., & <NAME>. (2013). Metabolic modeling of species interaction in the human microbiome elucidates community-level assembly rules.

# Basic usage:
python interact_scc.py --seedfiles1 organism_1.seedfiles --seedfiles2 organism_2.seedfiles

# Additional Options:
usage: interact_scc.py [-h] [--name1 NAME1] [--name2 NAME2]
                       [--seedfiles1 SEEDFILES1] [--seedfiles2 SEEDFILES2]
                       [--confidence CONFIDENCE] [--quiet QUIET]

Calculate metabolic interaction from two sets of seed information.

optional arguments:
  -h, --help            show this help message and exit
  --name1 NAME1         Name of first (meta)organism
  --name2 NAME2         Name of second (meta)organism
  --seedfiles1 SEEDFILES1
                        Directory of SCC network output for first
                        (meta)organism
  --seedfiles2 SEEDFILES2
                        Directory of SCC network output for second
                        (meta)organism
  --confidence CONFIDENCE
                        Minimum confidence values for seeds and sinks to be
                        considered in calculations
  --quiet QUIET         Turns on verbose output mode

#----------------------------------------------------------------------------------------------------------#

# Section 4 - Appendix
# Example files
# Sample files to be used for practice with each of the respective scripts

# ko_expression.list - list of KO codes and corresponding expression values for Clostridium difficile strain 630
# ko.list - list of KEGG gene codes and corresponding KO codes for the genome of Clostridium difficile strain 630
# organism_1.seedfiles and organism_2.seedfiles - Output of calc_seeds.py for Clostridium difficile 630 and Eubacterium rectale ATCC 33656<commit_msg>reformatting readme<commit_after>BiGSMAll
============

# BiGSMAll(BacterIal Genome-Scale Metabolic models for AppLied reverse ecoLogy)
# Python scripts and workflow by <NAME>, University of Michigan, 2014 - 2016

#----------------------------------------------------------------------------------------------------------#

# The function of this package is to observe putative metabolic requirements, interaction, and activity of bacteria
#	with the intention of inferring ecological interaction
# KEGG reference files and reference creation script can be found in the support directory
# Examples of input files for each program can be found in the examples directory

---------------------------------------------------------------------------

# Index:
Section 1:  Generating bipartite metabolic models used in conjunction with transcriptomics
Section 2:  Generating SCC networks of compounds only to derive source and sink lists
Section 3:  Comparing source and sink compounds to infer ecological interaction
Section 4:  Appendix describing example files for each script

---------------------------------------------------------------------------

# Section 1 - bipartite_graph.py
# Bipartite graphs 
Calculates relative importance of a given metabolite based on the expression of surrounding enzymes in a metabolic network

# Basic usage:
python bipartite_graph.py ko_expression.list

# Additional Options:
usage: bipartite_graph.py [-h] [--name NAME] [--min MIN] [--degree DEGREE]
                          [--iters ITERS]
                          input_file

Generate bipartite metabolic models and calculates importance of substrate nodes
based on gene expression.

positional arguments:
  input_file

optional arguments:
  -h, --help       show this help message and exit
  --name NAME      Organism or other name for KO+expression file (default is
                   organism)
  --min MIN        minimum importance value to report
  --degree DEGREE  minimum degree value to report
  --iters ITERS    iterations for random distribution subsampling
  
---------------------------------------------------------------------------

# Section 2 - scc_graph.py
# SCC networks
Purpose is to calculate seeds compounds to genome-scale metabolic networks according to KEGG annotation
SCC algorithm from <NAME>. et al. (2008). Large-scale reconstruction and phylogenetic analysis of metabolic environments.

# Basic usage:
python scc_graph.py ko.list

# Additional Options:
usage: scc_graph.py [-h] [--giant GIANT] [--component COMPONENT]
                    [--confidence CONFIDENCE]
                    newfile

Calculate set seeds from KO lists.

positional arguments:
  newfile

optional arguments:
  -h, --help            show this help message and exit
  --giant GIANT         Only focus on the largest component or not
  --component COMPONENT
                        Minimum threshold for SCC size to be included
  --confidence CONFIDENCE
                        Minimum confidence value allowed for seeds

---------------------------------------------------------------------------

# Section 3 - interact_scc.py
Calculating the interaction indices between seed files of 2 organisms
This refers to the directories of files generated by scc_graph.py
Interaction metrics from Levy R., & <NAME>. (2013). Metabolic modeling of species interaction in the human microbiome elucidates community-level assembly rules.

# Basic usage:
python interact_scc.py --seedfiles1 organism_1.seedfiles --seedfiles2 organism_2.seedfiles

# Additional Options:
usage: interact_scc.py [-h] [--name1 NAME1] [--name2 NAME2]
                       [--seedfiles1 SEEDFILES1] [--seedfiles2 SEEDFILES2]
                       [--confidence CONFIDENCE] [--quiet QUIET]

Calculate metabolic interaction from two sets of seed information.

optional arguments:
  -h, --help            show this help message and exit
  --name1 NAME1         Name of first (meta)organism
  --name2 NAME2         Name of second (meta)organism
  --seedfiles1 SEEDFILES1
                        Directory of SCC network output for first
                        (meta)organism
  --seedfiles2 SEEDFILES2
                        Directory of SCC network output for second
                        (meta)organism
  --confidence CONFIDENCE
                        Minimum confidence values for seeds and sinks to be
                        considered in calculations
  --quiet QUIET         Turns on verbose output mode

#----------------------------------------------------------------------------------------------------------#

# Section 4 - Appendix
# Example files
Sample files to be used for practice with each of the respective scripts

ko_expression.list - list of KO codes and corresponding expression values for Clostridium difficile strain 630
ko.list - list of KEGG gene codes and corresponding KO codes for the genome of Clostridium difficile strain 630
organism_1.seedfiles and organism_2.seedfiles - Output of calc_seeds.py for Clostridium difficile 630 and Eubacterium rectale ATCC 33656
{'fraction_non_alphanumeric': 0.15940333430827727, 'fraction_numerical': 0.011894316076825583, 'mean_word_length': 1.941783768282191, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '271345', 'n_tokens_mistral': 2522, 'n_tokens_neox': 2209, 'n_words': 1042}