VanLoo-lab / ascat

ASCAT R package
https://www.mdanderson.org/research/departments-labs-institutes/labs/van-loo-laboratory/resources.html#ASCAT
162 stars 85 forks source link

Number of markers per segment #133

Closed kw10 closed 1 year ago

kw10 commented 1 year ago

Hello,

Is there a way to determine the number of sites that were considered for each segment that is present in the *segments.txt file? I am running ascat.prepareHTS using tumour and normal BAM (exomes) and using the recommended files downloaded from the Battenberg github repository.

Thanks Kim

tlesluyes commented 1 year ago

Hi @kw10,

When you say 'sites', you mean 'SNPs', right? If that's the case, then we don't have any built-in function to do that but this should be very straightforward. One can iterate on each segment (ascat.output$segments) and count how many SNPs are located within such regions (ascat.bc$SNPpos). Because ASCAT relies on heterozygous SNPs to derive allele-specific profiles, I would also count the number of hetSNP per segment (check ascat.bc$Tumor_BAF_segmented).

Cheers,

Tom.

kw10 commented 1 year ago

Hi Tom,

Thanks for your response. Yes, I mean SNPs. A follow-up question - if I used a BED file (I have exome data), should I count only the SNPs that fell within the BED regions?

Thanks again, Kim

tlesluyes commented 1 year ago

Hi @kw10,

You can, all SNPs outside of the BED definition would have been discarded anyway.

Cheers,

Tom.

kw10 commented 1 year ago

Ah, right! Thanks!