Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing individuals when converting from Biotic to StoxBiotic #81

Closed
BergenCalling opened this issue Dec 12, 2022 · 4 comments · Fixed by StoXProject/RstoxData#269
Closed
Assignees

Comments

@BergenCalling
Copy link

Going from 12367 aged individuals to 5067 individuals when converting from Biotic to StoxBiotic. Error message: There are more than one 'serialnumber' (HaulKey in StoxBioticData) for 113 out of 243 'station'(StationKey in StoxBioticData) in the NMDBiotic data. In DefineBioticAssignment() it is currently only possible to asssing all hauls of a station in the map (manual assignment). If certain Hauls should be exclcuded, use FilterStoxBiotic(). Duplicated serialnumber for the following cruise/station (of the fishstation table of the BioticData):
NA/1
NA/10
NA/102
NA/105
NA/108
NA/11
NA/110
NA/111 etc

@edvinf
Copy link
Contributor

edvinf commented Dec 12, 2022

Thank you for reporting.

The warning message about duplicate station ids means that some stations (fishstations) have the same station number. In StoxBiotic these will be represented as one station with several hauls. That comes with some caveats, but is not a hard error, and it should not result in any loss of individuals. The warning message is unclear, which we will follow up in StoXProject/RstoxData#267 . You may add any comment to that message there.

In order to pin down what may be causing the loss of individuals, we will need a reproducible example. Preferably as small as possible, but an entire StoX-project will do. If it contains confidential data, or data sizes are very large. Please communicate it via internal IMR channels (shared disks or e-mail).

@edvinf edvinf self-assigned this Dec 12, 2022
@edvinf
Copy link
Contributor

edvinf commented Dec 12, 2022

Thanks for the example files (StoXProject/RstoxData#267 (comment)). It seems that the missing ages are from stations that are not included in the converted data, but some of them are also from stations probably filtered in earlier steps (like missiontype 4). It is possible that this relates to a recently resolved bug in RstoxData (StoXProject/RstoxData#241). #241 was closed after testing on a development version, so I will have to check if this applies to the version of RstoxData you are using.

If you can provide your version of RstoxData, I will run a test and get back to you if the development version provides a possible fix.

@BergenCalling
Copy link
Author

BergenCalling commented Dec 12, 2022 via email

@edvinf
Copy link
Contributor

edvinf commented Dec 12, 2022

Thanks again for reporting. If it is indeed the issue in #241 you are experiencing, it turns out that there is no available fix yet, and #241 is re-opened. You can likely proceed without a fix for StoX-Reca workflows, which I will try to explain below.

What is happening is that StoX fails to remove some age-readings when corresponding individuals are filtered out in a FilterBiotic-process. This seems to happen for data files which also contain prey-samples (stomach-samples). In the conversion to StoxBiotic, these age-readings does not match any individuals and are dropped.

If this is all that is going on, the conversion to StoxBiotic actually gives you the result you would have expected earlier in the project and you can continue using its output without a fix, as these age readings lost belong to individuals that have been filtered out of the data. Inspecting the files you submitted earlier, it does indeed look like all age-readings that are lost in the conversion have missiontype 4, and are probably not desired for Reca runs.

@edvinf edvinf linked a pull request Dec 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants