writeChangeoDb() puts NA for null/blank values

Issue #87 invalid
Scott Christley created an issue

I’m using the immcantation/suite:4.1.0 docker images. I read in an AIRR TSV file which has null/blank values for some field, calculate AA properties then write a new AIRR TSV file. The resultant file has NA for those fields and the file fails validation.

db <- readChangeoDb("/data/test/vdjserver1.airr.tsv")
d <- aminoAcidProperties(db)
writeChangeoDb(d, "new.airr.tsv")


$ airr-tools validate rearrangement -a new.airr.tsv 
Validating: new.airr.tsv
new.airr.tsv at record 1 has validation error: field complete_vdj has invalid bool NA
new.airr.tsv at record 2 has validation error: field complete_vdj has invalid bool NA
new.airr.tsv at record 3 has validation error: field complete_vdj has invalid bool NA
new.airr.tsv at record 4 has validation error: field complete_vdj has invalid bool NA

Comments (4)

  1. Jason Vander Heiden

    Try with airr::read_rearrangement and airr::write_rearrangement instead. The read/write changeo functions are for the legacy changeo format.

  2. Scott Christley reporter

    Ok, thanks, that works. It might helpful to point users to that in the documentation, for example in the Package Overview it give the changeo functions for file i/o which leads the user to think that they should be used. But maybe you have a separate issue for that, and you can close this one. All the vignettes use the exampledb, so there isn’t an example of reading/writing AIRR TSV files.

  3. Jason Vander Heiden

    Yeah, that’s a good point. We’ll figure out a way to clarify that in the documentation. The rearrangement IO functions aren’t in alakazam, so they aren’t appropriate to add to the package overview, but we’ll figure something out.

  4. Log in to comment