read.cif() has 'entid' instead of 'segid'

Issue #516 resolved
Xinqiu Yao created an issue

I found read.cif()gives an 'entid' column instead of 'segid' as generated by read.pdb(). Although we seldom use this column, it will cause an error when call write.pdb().

pdb <- read.cif('4v4e.cif')
pdb <- trim(pdb, chain=c('I', 'X'))
write.pdb(pdb, file='4v4e.pdb')
Error in `[.data.frame`(pdb$atom, , "segid") : undefined columns selected

Maybe we should make them consistent, or is there particular reasons to call it 'entid'?

Comments (3)

  1. Lars Skjærven

    I agree. it's probably better to rename it segid since we assign this as a pdb object anyway. it's called entid since the mmcif name for this field i entity_id.

  2. Log in to comment