R/processXML.R
removeBarcodeAndSamples.RdThis function takes an XML document, along with the name and value of an attribute, and removes the BarcodeB nodes that match the specified attribute. Additionally, it identifies the associated Sample nodes with the same name attribute as the removed BarcodeB nodes and removes them as well. These removals only occur if the sample/barcode node in question is not a control (e.g. IPC, NC, SC, Bridge, etc.)
removeBarcodeAndSamples(doc, attribute_name, attribute_value)The modified XML document with BarcodeB and associated Sample nodes removed.
doc <- read_xml("your_file.xml")
#> Error in read_xml("your_file.xml"): could not find function "read_xml"
new_doc <- removeBarcodeAndSamples(doc, "name", c("774951", "23112"))
#> Error: object 'doc' not found