|
本帖最后由 Yuan.Sh 于 2020-7-31 22:00 编辑
bash脚本默认参数设置
这里要注意一下,把bash默认参数转移到python脚本内的时候
里面的action = 'stat_true/false' 设置默认的时候记得要取反
这样调用的时候在取反就行
Step 3 导入数据
### 导入数据
# 路径
expr_file = os.path.join( wkd + 'data', 'pancan_rnaseq_freeze.tsv.gz')
mut_file = os.path.join(wkd + 'data', 'pancan_mutation_freeze.tsv.gz')
mut_burden_file = os.path.join(wkd + 'data', 'mutation_burden_freeze.tsv')
sample_freeze_file = os.path.join(wkd + 'data', 'sample_freeze.tsv')
copy_loss_file = os.path.join(wkd + 'data', 'copy_number_loss_status.tsv.gz')
copy_gain_file = os.path.join(wkd + 'data', 'copy_number_gain_status.tsv.gz')
vogel_file = os.path.join(wkd + 'data', 'vogelstein_cancergenes.tsv')
# 导入
sample_freeze = pd.read_table(sample_freeze_file, index_col=0) # 样本肿瘤类型
mut_burden = pd.read_table(mut_burden_file) # 突变负荷
rnaseq_full_df = pd.read_table(expr_file, index_col=0, compression='gzip') # rna表达谱
mutation_df = pd.read_table(mut_file, index_col=0, compression='gzip')
copy_loss_df = pd.read_table(copy_loss_file, index_col=0)
copy_gain_df = pd.read_table(copy_gain_file, index_col=0)
cancer_genes = pd.read_table(vogel_file)
### 分类器指定参数
# 测试NF1
genes = 'NF1'
genes = genes.split(',')
drop = bool(~drop)
copy_number = bool(~copy_number)
|
|