Trouble with scan1snps in haploid cross

19 views
Skip to first unread message

Gabe Rangel

unread,
Jul 27, 2022, 3:05:20 PM7/27/22
to R/qtl2 discussion
Good afternoon,

I have been using qtl2 for malaria parasite cross analysis. I have successfully completed all the tutorial scripts, including using the scan1snps command, but I cannot successfully run the scan1snps command with my own data. I continue to get the following error: 

>Error in .alleleprob_to_snpprob(genoprobs[[uchr]], sdp, interval, on_map) :
      Not compatible with requested type: [type=NULL; target=integer].
****
Below is the script I am using: 

>library(qtl2)
>HB3xDd2<-read_cross2("HB3xDd2.yaml")
>map <- insert_pseudomarkers(HB3xDd2$gmap, step=0, cores=0)
>pr <- calc_genoprob(HB3xDd2, map, error_prob=0.002, cores=0)
>out <- scan1(pr, HB3xDd2$pheno, cores=0)
>query_variants<-create_variant_query_func(dbfile = "./HB3xDd2_variant.db")
>variants <- query_variants(3, .7, 1)
>out_snps<-scan1snps(
  pr,
  HB3xDd2$pmap,
  HB3xDd2$pheno,
  query_func = query_variants,
  chr = 3,
  start=.7,
  end=1,
  cores = 0,
  keep_all_snps = T
)


Any and all help would be greatly appreciated! 

Cheers,
Gabe Rangel

Karl Broman

unread,
Jul 27, 2022, 4:57:48 PM7/27/22
to R/qtl2 discussion
I think the problem is that the SNP database, or the query function, needs to be revised to include SDP information: the "strain distribution pattern" (as an integer) for the founder strains.

But this doesn't really apply in your cross, as I understand it, where you have haploids with two alleles?
I don't think scan1snps is relevant for this sort of cross; it's potentially useful for collapsing multi-parent populations to binary SNPs, but it won't add any information for your cross, over what is in the observed genotype data and the results of scan1().

karl
Reply all
Reply to author
Forward
0 new messages