コード例 #1
0
ファイル: Utils.py プロジェクト: airanmehr/bio
def saveAnnotationUCSC():
    utl.BED.saveBEDGraph(utl.loadSNPID()["ID"], color="0,0,0", name="dbSNP", fout_name=path + "dbSNP")
    ann = (
        pd.read_csv(utl.home + "storage/Data/Dmelanogaster/Hypoxia/popsss/all.ANN.csv", sep="\t")
        .set_index(["CHROM", "POS"])
        .loc[IH.replace({False: None}).dropna().index]
    )
    ann = ann.iloc[:, :3].reset_index().drop_duplicates().set_index(["CHROM", "POS"])
    ann = ann.Annotation + "(" + ann.REF + ">" + ann.Allele + ")"
    utl.BED.saveBEDGraph(ann, color="0,0,0", name="SNP effect", fout_name=path + "UCSC/effectSNP")