gl2fasta not concatenating across loci

7 views
Skip to first unread message

rachel...@gmail.com

unread,
Sep 1, 2026, 2:41:23 AM (yesterday) Sep 1
to dartR

Hi there,

I'm trying to generate an input file for splitstree - I have an established bit of code that has always worked well for this and the first step is the gl2fasta function. But for some reason that function is not working properly for me. With either method 1/2 or 3/4, it outputs the data for just a single locus instead of concatenating data across all loci. 

I switched to other datasets and the function works fine so it's not the code or the function, it's something with this particular dataset. It is unusual in that it has been generated by the co-analysis of two independently generated datasets - both are dart datasets but produced from different labs so different sampling designs and sample labeling but otherwise should be entirely compatible. 

I've checked the trimmed sequence, loc.all, and position slots - all the information is there. I've done all sorts of other analyses with this dataset and no issues. I can't for the life of me figure out what's going on. 

Just wondering if anyone else has had this issue and know what the fix is?

Cheers,
Rachel 

Jose Luis Mijangos

unread,
Sep 1, 2026, 4:26:54 AM (yesterday) Sep 1
to dartR
Hi Rachel,

Thanks for sending a subset of your dataset. I found that your dataset has one locus (22905546-65-G/A) whose SNP position is outside of the trimmed sequence. gl2fasta removes such loci before concatenating but there was a bug in that step in the CRAN version. 

The bug is already fixed in the development version, which you can install with:

devtools::install_github("green-striped-gecko/dartR.base", ref = "dev")

Cheers,
Luis

rachel...@gmail.com

unread,
Sep 1, 2026, 4:49:45 AM (yesterday) Sep 1
to dartR

You're a gem, Luis. Thank you!! 
Reply all
Reply to author
Forward
0 new messages