Public
Edited
Dec 29
Insert cell
Insert cell
Insert cell
Insert cell
mSigSDK = module.mSigSDK;
Insert cell
Insert cell
Insert cell
projects = ['TCGA-KIRC']
Insert cell
MAFDescriptions = await mSigSDK.TCGA.getMafInformationFromProjects(projects)
Insert cell
MAFDescriptions['TCGA-KIRC']
Insert cell
MAFFiles = await mSigSDK.TCGA.getVariantInformationFromMafFiles(MAFDescriptions)
Insert cell
Insert cell
genes = ['ENSG00000155657']

Insert cell
geneProject = await mSigSDK.TCGA.getProjectsByGene(genes)
Insert cell
Insert cell
files = ['9e5f8edc-5074-43b7-a870-594aeb36e2aa', '8d5a94c8-b3d9-4991-8ce9-f7aa9189938c', 'dedf9f52-7ded-4cc5-bba2-da89a48b5176', '3aa53aa2-97cd-43a8-b7b1-09f0bf6381dd']
Insert cell
tpmResults = await mSigSDK.TCGA.getTpmCountsByGenesFromFiles(genes, files)
Insert cell
Insert cell
Insert cell
function res() {
return { 'TCGA-LUSC': { 'maf_files': ['0b3d2db3-8ae3-4d39-bd9b-9d1e7a133b65', '9fed5902-6e95-4526-a119-ec4eade5576b' ] } }
}
Insert cell
data = await mSigSDK.TCGA.getVariantInformationFromMafFiles(res())
Insert cell
Insert cell
Insert cell
convertedJSON = mSigSDK.TCGA.convertTCGAProjectIntoJSON(data["TCGA-LUSC"].variant_information, data["TCGA-LUSC"].mutational_spectra);
Insert cell
mSigSDK.mSigPortal.mSigPortalPlots.plotPatientMutationalSpectrum(convertedJSON, "mutationalSpectrumMatrixWGSTCGA");
Insert cell
Insert cell
mutationalSignatures = await mSigSDK.mSigPortal.mSigPortalData.getMutationalSignaturesData("WGS", "COSMIC_v3_Signatures_GRCh37_SBS96", "SBS", 96, 10000)
Insert cell
mutationalSignaturesExtracted = await mSigSDK.mSigPortal.mSigPortalData.extractMutationalSpectra(mutationalSignatures, "signatureName")
Insert cell
extractedPatientData = mSigSDK.mSigPortal.mSigPortalData.extractMutationalSpectra(convertedJSON)
Insert cell
nnlsExposures = mSigSDK.signatureFitting.fitMutationalSpectraToSignatures(mutationalSignaturesExtracted, extractedPatientData, { exposureThreshold: 0.02, exposureType: "relative" })
Insert cell
Insert cell
mSigSDK.signatureFitting.plotPatientMutationalSignaturesExposure(nnlsExposures["0b3d2db3-8ae3-4d39-bd9b-9d1e7a133b65"], "exposureGraph", "0b3d2db3-8ae3-4d39-bd9b-9d1e7a133b65")
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more