metaKEGG 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of metaKEGG might be problematic. Click here for more details.
- __init__.py +0 -0
- metaKEGG/__init__.py +1 -0
- metaKEGG/cli.py +70 -0
- metaKEGG/config.py +22 -0
- metaKEGG/helpers/__init__.py +0 -0
- metaKEGG/helpers/helpfunctions.py +741 -0
- metaKEGG/modules/__init__.py +0 -0
- metaKEGG/modules/colorscale.py +7 -0
- metaKEGG/modules/drawing_functions.py +642 -0
- metaKEGG/modules/pipeline.py +558 -0
- metaKEGG-0.0.1.dist-info/LICENSE +661 -0
- metaKEGG-0.0.1.dist-info/METADATA +488 -0
- metaKEGG-0.0.1.dist-info/RECORD +16 -0
- metaKEGG-0.0.1.dist-info/WHEEL +5 -0
- metaKEGG-0.0.1.dist-info/entry_points.txt +2 -0
- metaKEGG-0.0.1.dist-info/top_level.txt +2 -0
__init__.py
ADDED
|
File without changes
|
metaKEGG/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .modules.pipeline import Pipeline
|
metaKEGG/cli.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from .modules.pipeline import Pipeline
|
|
2
|
+
import argparse
|
|
3
|
+
|
|
4
|
+
def parse_args():
|
|
5
|
+
"""
|
|
6
|
+
Parse command line arguments.
|
|
7
|
+
|
|
8
|
+
Returns:
|
|
9
|
+
argparse.Namespace: Parsed command line arguments.
|
|
10
|
+
"""
|
|
11
|
+
parser = argparse.ArgumentParser(prog='metaKEGG',
|
|
12
|
+
description='Pipeline for automatic enichement analysis mapping on KEGG pathways.')
|
|
13
|
+
|
|
14
|
+
parser.add_argument('--input_file_path', required=True, help='Path to the input file (Excel format) or list of input files. Can be a David analysis output, or RNAseq')
|
|
15
|
+
parser.add_argument('--sheet_name_paths', required=True, default='pathways', help='Sheet name containing the pathway information (see docs). Has to apply to all input files in case of multiple.')
|
|
16
|
+
parser.add_argument('--sheet_name_genes', required=True, default='gene_metrics', help='Sheet name for gene information (see docs). Has to apply to all input files in case of multiple.')
|
|
17
|
+
parser.add_argument('--genes_column', required=True, default='gene_symbol', help='Column name for gene symbols in the sheet_name_genes')
|
|
18
|
+
parser.add_argument('--log2fc_column', required=True, default='logFC', help='Column name for log2fc values in the sheet_name_genes')
|
|
19
|
+
parser.add_argument('--analysis_type', required=True, type=int, default=None, choices=[1, 2, 3, 4, 5, 6, 7] ,help='Analysis type (1-7)')
|
|
20
|
+
parser.add_argument('--count_threshold', required=False, type=int, default=2, help='Minimum number of genes per pathway, for pathway to be drawn. Default value : 2')
|
|
21
|
+
parser.add_argument('--input_label', required=False, default=None, help='Input label or list of labels for multiple inputs')
|
|
22
|
+
parser.add_argument('--folder_extension', required=False, default=None, help='Folder extension to be appended to the default naming scheme. If None and default folder exists, will overwrite folder')
|
|
23
|
+
parser.add_argument('--methylation_path', required=False, default=None, help='Path to methylation data (Excel , CSV or TSV format)')
|
|
24
|
+
parser.add_argument('--methylation_pvalue', required=False, default=None, help='Column name for methylation p-value')
|
|
25
|
+
parser.add_argument('--methylation_genes', required=False, default=None, help='Column name for methylation gene symbols')
|
|
26
|
+
parser.add_argument('--methylation_pvalue_thresh', required=False, default=0.05, help='P-value threshold for the methylation values')
|
|
27
|
+
parser.add_argument('--miRNA_path', required=False, default=None, help='Path to miRNA data (Excel , CSV or TSV format)')
|
|
28
|
+
parser.add_argument('--miRNA_pvalue', required=False, default=None, help='Column name for miRNA p-value')
|
|
29
|
+
parser.add_argument('--miRNA_genes', required=False, default=None, help='Column name for miRNA gene symbols')
|
|
30
|
+
parser.add_argument('--miRNA_pvalue_thresh', required=False, default=0.05, help='P-value threshold for the miRNA values')
|
|
31
|
+
parser.add_argument('--benjamini_threshold', required=False, default=None, help='Benjamini Hochberg p-value threshold for the pathway')
|
|
32
|
+
parser.add_argument('--save_to_eps', required=False, default=False, help='True/False statement to save the maps and colorscales or legends as seperate .eps files in addition to the .pdf exports')
|
|
33
|
+
|
|
34
|
+
return parser.parse_args()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def main():
|
|
38
|
+
"""
|
|
39
|
+
Main function to execute the pipeline based on the parsed command line arguments.
|
|
40
|
+
"""
|
|
41
|
+
args = parse_args()
|
|
42
|
+
|
|
43
|
+
if args.analysis_type is not None:
|
|
44
|
+
Pipeline(
|
|
45
|
+
input_file_path=args.input_file_path,
|
|
46
|
+
sheet_name_paths=args.sheet_name_paths,
|
|
47
|
+
sheet_name_genes=args.sheet_name_genes,
|
|
48
|
+
genes_column=args.genes_column,
|
|
49
|
+
log2fc_column=args.log2fc_column,
|
|
50
|
+
analysis_type=args.analysis_type,
|
|
51
|
+
count_threshold=args.count_threshold,
|
|
52
|
+
input_label=args.input_label,
|
|
53
|
+
folder_extension=args.folder_extension,
|
|
54
|
+
methylation_path=args.methylation_path,
|
|
55
|
+
methylation_pvalue=args.methylation_pvalue,
|
|
56
|
+
methylation_genes=args.methylation_genes,
|
|
57
|
+
methylation_pvalue_thresh=args.methylation_pvalue_thresh,
|
|
58
|
+
miRNA_path=args.miRNA_path,
|
|
59
|
+
miRNA_pvalue=args.miRNA_pvalue,
|
|
60
|
+
miRNA_genes=args.miRNA_genes,
|
|
61
|
+
miRNA_pvalue_thresh=args.miRNA_pvalue_thresh,
|
|
62
|
+
|
|
63
|
+
benjamini_threshold=args.benjamini_threshold,
|
|
64
|
+
save_to_eps=args.save_to_eps,
|
|
65
|
+
)
|
|
66
|
+
else:
|
|
67
|
+
print(f'Could not initiate the pipeline dues to missing value for the analysis_type. You provided {args.analysis_type}')
|
|
68
|
+
|
|
69
|
+
if __name__ == "__main__":
|
|
70
|
+
main()
|
metaKEGG/config.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
pale_yellow = '#ffffd1'
|
|
2
|
+
gray = '#d6d6d6'
|
|
3
|
+
|
|
4
|
+
tsv_suffixes = ['.tsv']
|
|
5
|
+
csv_suffixes = ['.csv']
|
|
6
|
+
excel_suffixes = ['.xlsx', '.xls']
|
|
7
|
+
|
|
8
|
+
analysis_types = {1 : 'Single input (Gene IDs)' ,
|
|
9
|
+
2 : 'Single input (Transcript IDs)' ,
|
|
10
|
+
3 : 'Multiple input (Gene IDs)',
|
|
11
|
+
4 : 'Single input w Methylation (Gene IDs)',
|
|
12
|
+
5 : 'Single input w miRNA (Gene IDs)',
|
|
13
|
+
6 : 'Single input w Methylation & miRNA (Gene IDs)',
|
|
14
|
+
7 : 'Single input (Gene IDs) Bulk mapping'}
|
|
15
|
+
|
|
16
|
+
analysis_types_to_execute = {1 : 'single_input_genes()' ,
|
|
17
|
+
2 : 'single_input_transcripts()' ,
|
|
18
|
+
3 : 'multiple_inputs()',
|
|
19
|
+
4 : 'single_input_with_methylation()',
|
|
20
|
+
5 : 'single_input_with_miRNA()',
|
|
21
|
+
6 : 'single_input_with_methylation_and_miRNA()',
|
|
22
|
+
7 : 'single_input_genes_bulk_mapping()'}
|
|
File without changes
|