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

Problem in createReplicTimingFile.R #169

Closed giorgiabiddau closed 6 months ago

giorgiabiddau commented 7 months ago

Hi all,

I think there's a problem with the function "createReplicTimingFile.R". Specifically, when I run it, I get an error at line 8

  1. loci_gr <- GRanges(seqnames = loci[,2], ranges = IRanges(start = loci[,3], width = 1))

If I understand correctly, "loci" should be a dataframe with two columns (chromosomes and positions). I tried to solve it by replacing 2 with 1 and 3 with 2:

  1. loci_gr <- GRanges(seqnames = loci[,1], ranges = IRanges(start = loci[,2], width = 1))

I would like to know whether the solution is appropriate!

Thank you so much in advance!

Giorgia

tlesluyes commented 7 months ago

Hi @giorgiabiddau,

The loci object corresponds to the SNPpos example provided here. It should be a table with 3 columns: probe IDs, chromosomes and positions. Internally, ASCAT derives the loci_gr object as follows (so the 3 columns are used):

loci_gr <- GRanges(seqnames = loci[,2], ranges = IRanges(start = loci[,3], width = 1))
names(loci_gr) <- loci[,1]

I am not sure why you are trying to modify the code here, I recommend sticking to the example format and modifying your input file so the probe IDs are present.

Cheers,

Tom.

giorgiabiddau commented 7 months ago

Hi Tom,

thank you so much for your answer!

Oh, I created a data frame where the probes IDs were the rownames (and it worked with createGCcontentFile.R), that's why I only have two. Thanks for the suggestion!

Cheers,

Giorgia