gl.report.parent.offspring

27 views
Skip to first unread message

Alan Couch

unread,
May 11, 2025, 4:38:34 PMMay 11
to dartR
Since gl.join was fixed in the dev release recently  (thanks Luis!):

# Install developing version of dartR.base
devtools::install_github("green-striped-gecko/dartR.base@dev")

gl.report.parent.offspring coincidentally is giving me the following error:

> po<-gl.report.parent.offspring(gl) Starting gl.report.parent.offspring Processing genlight object with SNP data Generating null expectation for distribution of counts of pedigree incompatibility Dataset does not include RepAvg among the locus metrics, therefore the reproducibility filter was not used Error in 1:nLoc(x) : NA/NaN argument

I have filtered:
> gl.filterallna(gl)
> gl.report.allna(gl) Starting gl.report.allna Identifying loci and individuals scored all missing (NA) Reporting loci that are scored as all missing (NA) Zero loci that are missing (NA) across all individuals Reporting individuals that are scored as all missing (NA) Zero individuals that are missing (NA) across all loci Completed: gl.report.allna

Wondering if I have made a mistake or if we have broken something in the gl along the way?

Peter Unmack

unread,
May 11, 2025, 9:38:08 PMMay 11
to da...@googlegroups.com
G'day Alan

You are probably working on an old file from DArT which has the correct
column for RepAve, but with a different name, probably
AvgReproducibility or something like that. Just rename that column in
your data file and it will work. It's usually the last column before
the actual genotype calls by individuals. Failing that, just add a
column, make all the values 1 and call it RepAvg.

We've got a lot of stuff going on with cods these days in case you are
interesting, whole genomes and all kinds of fun stuff. Hope you are
doing well these days.

Cheers
Peter

On 12/05/2025 6:38 am, Alan Couch wrote:
> Since gl.join was fixed in the dev release recently  (thanks Luis!):
>
> # Install developing version of dartR.base
> devtools::install_github("green-striped-gecko/dartR.base@dev")
>
> gl.report.parent.offspring coincidentally is giving me the following error:
>
>> po<-gl.report.parent.offspring(gl) Starting gl.report.parent.offspring
> Processing genlight object with SNP dataGenerating null expectation for
> distribution of counts ofpedigree incompatibilityDataset does not
> include RepAvg among the locus metrics,therefore the reproducibility
> filter was not usedError in 1:nLoc(x) : NA/NaN argument
>
> I have filtered:
>> gl.filterallna(gl)
>> gl.report.allna(gl) Starting gl.report.allna Identifying loci and individuals scored all
> missing (NA)Reporting loci that are scored as all missing (NA)Zero loci
> that are missing (NA) across all individuals Reporting individuals that
> are scored as all missing (NA)Zero individuals that are missing (NA)
> across all loci Completed: gl.report.allna
>
> Wondering if I have made a mistake or if we have broken something in the
> gl along the way?
>
> --
> You received this message because you are subscribed to the Google
> Groups "dartR" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dartr+un...@googlegroups.com
> <mailto:dartr+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> dartr/970eb0af-3759-4536-a172-3d20a2da0e0en%40googlegroups.com <https://
> groups.google.com/d/msgid/dartr/970eb0af-3759-4536-
> a172-3d20a2da0e0en%40googlegroups.com?utm_medium=email&utm_source=footer>.

Alan Couch

unread,
May 12, 2025, 3:45:37 PMMay 12
to dartR
Thanks Peter, This makes sense. I am joining old and new DArT files.

These are my DArT columns:
MarkerName
AlleleSequenceRef
AlleleSequenceAlt
Variant
CallRate
OneRatioRef
OneRatioSnp
FreqHomRef
FreqHomSnp
FreqHets
PICRef
PICSnp
AvgPIC
AvgCountRef
AvgCountSnp
RatioAvgCountRefAvgCountSnp

I do get the feeling that the naming here is not in line with current dartRverse convention/expectation (as per doco) but it works fine mostly.
cheers

Alan

Jose Luis Mijangos

unread,
May 12, 2025, 7:04:37 PMMay 12
to dartR

Hi Alan,

The issue you're encountering is due to some missing values in the slot where rdepth values are stored. We're working on a more general fix, but in the meantime, you can resolve it by assigning a value to the missing entries—here’s a quick workaround:

library(dartRverse) 
t1 <- readRDS("gl.rds") 
# Identify NAs 
na_loc <- which(is.na(t1$other$loc.metrics$rdepth)) 
 # Replace NAs with the mean rdepth 
t1$other$loc.metrics$rdepth[na_loc] <- mean(t1$other$loc.metrics$rdepth, na.rm = TRUE) 
 r1 <- gl.report.parent.offspring(t1)
  

Also, just a quick note about gl.join: it's mainly intended for joining very large datasets, like the kind DArT often delivers in two separate files. If you're trying to join datasets from different orders, there could be issues—like each dataset having a different reference allele—that might bias your analyses. In those cases, we recommend asking DArT to co-analyse the orders (i.e., re-call genotypes from both orders together).


Cheers,

Luis

Alan Couch

unread,
May 12, 2025, 7:21:47 PMMay 12
to dartR
Super helpful. Thanks so much. Special thanks for the tip where I might be joining with some risk! I will discuss with Andrzej.

Bernd.Gruber

unread,
May 12, 2025, 7:39:38 PMMay 12
to da...@googlegroups.com

Hi Alan,

 

It is possible to “recall” also yourself if that is the only issue, but as luis wrote better to ask dart if possible as they can then also standardise the other loc metrics which are not necessarily to be recalculated. E.g. reproducibility

 

From: da...@googlegroups.com <da...@googlegroups.com> On Behalf Of Alan Couch
Sent: Tuesday, 13 May 2025 9:22 AM
To: dartR <da...@googlegroups.com>
Subject: Re: [dartR] gl.report.parent.offspring

 

Super helpful. Thanks so much. Special thanks for the tip where I might be joining with some risk! I will discuss with Andrzej.

On Tuesday, 13 May 2025 at 09:04:37 UTC+10 luis.m...@gmail.com wrote:

Hi Alan,

The issue you're encountering is due to some missing values in the slot where rdepth values are stored. We're working on a more general fix, but in the meantime, you can resolve it by assigning a value to the missing entries—here’s a quick workaround:

library(dartRverse) 

t1 <- readRDS("gl.rds") 

# Identify NAs 

na_loc <- which(is.na(t1$other$loc.metrics$rdepth)) 

 # Replace NAs with the mean rdepth 

t1$other$loc.metrics$rdepth[na_loc] <- mean(t1$other$loc.metrics$rdepth, na.rm = TRUE) 

 r1 <- gl.report.parent.offspring(t1)

  

Also, just a quick note about gl.join: it's mainly intended for joining very large datasets, like the kind DArT often delivers in two separate files. If you're trying to join datasets from different orders, there could be issues—like each dataset having a different reference allele—that might bias your analyses. In those cases, we recommend asking DArT to co-analyse the orders (i.e., re-call genotypes from both orders together).

 

Cheers,

Luis

> To view this discussion visit https://groups.google.com/d/msgid/
> dartr/970eb0af-3759-4536-a172-3d20a2da0e0en%40googlegroups.com <https://
> groups.google.com/d/msgid/dartr/970eb0af-3759-4536-
> a172-3d20a2da0e0en%40googlegroups.com?utm_medium=email&utm_source=footer>.

--

You received this message because you are subscribed to the Google Groups "dartR" group.

To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dartr/18532fc4-ad0d-4bc3-acff-85676b27a88an%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages