comparison decoupler_pathway_inference.py @ 8:9864fd2cc1f0 draft

planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 03b4d647e2dd8a333f347d3cfbe3dd5c7b407f61
author ebi-gxa
date Wed, 30 Oct 2024 14:01:19 +0000
parents c6787c2aee46
children
comparison
equal deleted inserted replaced
7:2c5686d627c0 8:9864fd2cc1f0
77 "--method", 77 "--method",
78 help="Activity inference method", 78 help="Activity inference method",
79 default="mlm", 79 default="mlm",
80 required=True, 80 required=True,
81 ) 81 )
82
83 # add activity inference method option
84 parser.add_argument(
85 "-g",
86 "--var_gene_symbols_field",
87 help="Gene symbols field",
88 default=None,
89 )
82 args = parser.parse_args() 90 args = parser.parse_args()
83 91
84 # check that either -o or --output is specified 92 # check that either -o or --output is specified
85 if args.output is None: 93 if args.output is None:
86 raise ValueError("Please specify either -o or --output") 94 raise ValueError("Please specify either -o or --output")
100 "Source, target, and weight columns are not present in the network" 108 "Source, target, and weight columns are not present in the network"
101 ) 109 )
102 110
103 111
104 print(type(args.min_n)) 112 print(type(args.min_n))
113
114 if args.var_gene_symbols_field and args.var_gene_symbols_field in adata.var.columns:
115 # Storing index in a column called 'index_bak'
116 adata.var['index_bak'] = adata.var.index
117 adata.var.set_index(args.var_gene_symbols_field, inplace=True)
118
105 119
106 if args.method == "mlm": 120 if args.method == "mlm":
107 dc.run_mlm( 121 dc.run_mlm(
108 mat=adata, 122 mat=adata,
109 net=network, 123 net=network,