acorg/Racmacs

Incompatibility with Eu's ace format

Opened this issue · 5 comments

When reading in ace generated by Eu's software, I come across a few issues. I'm not suggesting they necessarily need to be fixed (feel free to add the wontfix label & close), but I thought it would be good to document them for others working with these types of file.

  1. Points do not show in the viewer because the short name has been used for agShape or srShape e.g. "B" instead of "BOX"
  2. Viewer does not show points with color names e.g. "green" instead of "#00FF00"
  3. Column bases are not preserved
  4. agSize and agOutlineWidth are not comparable between formats.
  5. Some information loss (names of tables, geographical information I think)
  6. removeSera gives an error, I've not figured out why (I've tried giving antigens & sera unique names & IDs but I still get a similar error)

R(54401,0x112ef9e00) malloc: *** error for object 0x7fe40ce06200: pointer being freed was not allocated
R(54401,0x112ef9e00) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort R

These are my current functions to get around some of these issues

acer <- function(map){
  agShape(map)[agShape(map)=="E"] <- "EGG"

  srShape(map)[srShape(map)=="B"] <- "BOX"
  srShape(map)[srShape(map)=="U"] <- "UGLYEGG"

  agOutlineWidth(map) <- 1
  srOutline(map) <- "#212121"

  agCoords(map)[,2] <- -agCoords(map)[,2]
  srCoords(map)[,2] <- -srCoords(map)[,2]

  return(map)
}

rename <- function(map){
  agNames(map) <- paste(agNames(map), agLabIDs(map), agPassage(map), agReassortant(map), 1:numAntigens(map))
  srNames(map) <- paste(srNames(map), srIDs(map), srPassage(map), srReassortant(map))

  return(map)
}

To get around the RStudio crash when using removeAntigens or removeSera, I create a new map as follows:

vcm <- rename(acer(vcm))
new_map <- acmap(ag_names=agNames(vcm), sr_names=srNames(vcm), titer_table=titerTable(vcm), ag_coords=agCoords(vcm), sr_coords=srCoords(vcm))
test <- removeAntigens(new_map, 1)

Thanks Sarah, do you have an example ace file from acmacs that has these problems? In particular the removeSera problem since the others are easier to reproduce, although it would also be helpful if you could send examples for those too.

Sure, I'll slack you one. In my opinion it's pretty low priority since I'm the only one affected.

Hi Sarah,

Some of these are now resolved, I'm not sure about the rest, perhaps you could check with the latest version where you are still having issues.

When reading in ace generated by Eu's software, I come across a few issues. I'm not suggesting they necessarily need to be fixed (feel free to add the wontfix label & close), but I thought it would be good to document them for others working with these types of file.

  1. Points do not show in the viewer because the short name has been used for agShape or srShape e.g. "B" instead of "BOX"

Should be resolved.

  1. Viewer does not show points with color names e.g. "green" instead of "#00FF00"

Should be resolved.

  1. Column bases are not preserved
  2. agSize and agOutlineWidth are not comparable between formats.
  3. Some information loss (names of tables, geographical information I think)
  4. removeSera gives an error, I've not figured out why (I've tried giving antigens & sera unique names & IDs but I still get a similar error)

R(54401,0x112ef9e00) malloc: *** error for object 0x7fe40ce06200: pointer being freed was not allocated R(54401,0x112ef9e00) malloc: *** set a breakpoint in malloc_error_break to debug zsh: abort R

Not sure about the rest of these, perhaps you could recheck with the latest version.