Closed Jodiestrada closed 11 months ago
I'm a bit surprised that this is still an issue, I thought that I'd already fixed this problem when I caught it during a Chinook QC.
The alt_spp
code chunk has a trap for when you don't have all the required alternate markers, and it should update the sample size table with NA for wrong_spp
if don't have all the markers. I checked this trap for S263, it's not working because one of the failed markers (One_MHC2_190) is in the dataset. find_alt_species()
has stop()
messages for when none of the alternate markers are present and none of the failed markers are present. I think this can be fixed by updating the trap at the top of the alt_spp
code chunk, so it will only run if you have at least one failed and one alternate marker in your dataset.
Ah gotcha, thanks for fixing the issue with this trap.
From: Andy Barclay @.> Sent: Friday, December 1, 2023 8:59 AM To: commfish/GCLr @.> Cc: Shedd, Kyle R (DFG) @.>; Comment @.> Subject: Re: [commfish/GCLr] Spp ID choke (Issue #65)
CAUTION: This email originated from outside the State of Alaska mail system. Do not click links or open attachments unless you recognize the sender and know the content is safe.
The alt_spp code chunk has a trap for when you don't have all the required alternate markers, and it should update the sample size table with NA for wrong_spp if don't have all the markers. I checked this trap for S263, it's not working because one of the failed markers (One_MHC2_190) is in the dataset. find_alt_species() has stop() messages for when none of the alternate markers are present and none of the failed markers are present. I think this can be fixed by updating the trap at the top of the alt_spp code chunk, so it will only run if you have at least one failed and one alternate marker in your dataset.
- Reply to this email directly, view it on GitHubhttps://github.com/commfish/GCLr/issues/65#issuecomment-1836546044, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC54QBJKHFXVNFDUXRSMF6TYHILHTAVCNFSM6AAAAABABYAXSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGU2DMMBUGQ. You are receiving this because you commented.Message ID: @.**@.>>
The qc_template has been updated to avoid this issue. These changes won't be available in the package until the next merge with dev.
Following up on the spp ID (see email chain below):
Currently the project final sample size table won't get populated if there is no spp ID, Andy proposed that the script kick out a table with n/a if the spp ID markers aren't present so that the code can continue running. We also talked about there being a note in duplicate check that the number of duplicates with 24 markers (especially Kasilof) could potentially kick out a lot of duplicates (we had 38 in this one) due to them being kin and the marker set not being broad enough to separate them out.
Ah super,
Yes it was quite scary! I did keep clicking past that error and it of course kept erroring which was fine but then I get to Final Sample Size and it affected/effected that as well and wouldn’t populate; which is fine for me but might affect/effect you guys.
Also, (I will put this in github) it would be radical if the duplicates table at line 340 had the copy/download feature. This project at first glance has like 38 dups I want to scratch into.
Thanks, jodi
Chase,
Yes, we should change the message to a warning that is less scary. Maybe something like, ‘None of the alternate species markers are included in your marker suite, so no alternate check can be performed. All is well, carry on!’ 😊
We’ll also have to make sure that the function returns an object that can be used to populate the final sample size object in the script.
Andy
From: Jalbert, Chase S (DFG) [chase.jalbert@alaska.gov](mailto:chase.jalbert@alaska.gov) Sent: Thursday, November 30, 2023 6:03 AM To: Estrada, Jodi L (DFG) [jodi.estrada@alaska.gov](mailto:jodi.estrada@alaska.gov); Barclay, Andy W (DFG) [andy.barclay@alaska.gov](mailto:andy.barclay@alaska.gov); Shedd, Kyle R (DFG) [kyle.shedd@alaska.gov](mailto:kyle.shedd@alaska.gov) Cc: Solin, Bryce A (DFG) [bryce.solin@alaska.gov](mailto:bryce.solin@alaska.gov) Subject: RE: error
Jodi, it looks like this is an UCI project that uses the marker suite S138_UCI_24SNP. This is expected because the function only works on certain markers, which aren’t found in that panel (it only checks 5 alternate and 6 failure markers). So it isn’t necessarily an error but more of a warning that there is nothing to check...@Barclay, Andy W (DFG), perhaps we should change the function to a more informative message/warning, rather than the scary error?
Chase