master
chaopower 2024-01-08 10:44:50 +08:00
parent e57812a823
commit 455c598d36
3 changed files with 12 additions and 2 deletions

View File

@ -108,7 +108,14 @@ class ChemoRun:
record = records[(chrom, end)] record = records[(chrom, end)]
ref = record.ref ref = record.ref
alt = record.alts[0] alt = record.alts[0]
gt = '/'.join(list(map(str, sorted(record.samples.get(record.samples.keys()[0]).get('GT'))))) # gt = '/'.join(list(map(str, sorted(record.samples.get(record.samples.keys()[0]).get('GT')))))
freq = record.samples.get(record.samples.keys()[-1]).get('AF')[0]
if freq > 0.9:
gt = '1/1'
elif 0.9 >= freq > 0.1:
gt = '0/1'
else:
gt = '0/0'
fliter = pd.concat([fliter, drug_rsid_data[ fliter = pd.concat([fliter, drug_rsid_data[
(drug_rsid_data['chr'] == chrom) & (drug_rsid_data['chr'] == chrom) &
(drug_rsid_data['end'] == end) & (drug_rsid_data['end'] == end) &

View File

@ -58,6 +58,10 @@ while (<IN>) {
my $filters = split(";", $line[101]); my $filters = split(";", $line[101]);
my $gene = (split(";", $line[6]))[0]; my $gene = (split(";", $line[6]))[0];
if ($pipeline eq 'germline') {
$freq = (split(";", $line[-1]))[6];
}
my @reason; my @reason;
# 黑名单 # 黑名单
if (exists $blacklist{join("_", @line[0 .. 4])}) { if (exists $blacklist{join("_", @line[0 .. 4])}) {

View File

@ -241,7 +241,6 @@ class PostProcess:
tmb_df = tmb_df.set_index(key_cols) tmb_df = tmb_df.set_index(key_cols)
# 在filter_sum_df中的process列中追加字符串";tmb"对应tmb_df中的行 并且 是非 12类突变 # 在filter_sum_df中的process列中追加字符串";tmb"对应tmb_df中的行 并且 是非 12类突变
print(tmb_df.index)
filter_sum_df['process'] = filter_sum_df.index.map( filter_sum_df['process'] = filter_sum_df.index.map(
lambda x: filter_sum_df.at[x, 'process'] + ';tmb' if x in tmb_df.index and filter_sum_df.at[ lambda x: filter_sum_df.at[x, 'process'] + ';tmb' if x in tmb_df.index and filter_sum_df.at[
x, 'AMP_mut_level'] not in ['I', 'II'] else filter_sum_df.at[x, 'process']) x, 'AMP_mut_level'] not in ['I', 'II'] else filter_sum_df.at[x, 'process'])