prototype function for relabelling treenodes with different accession/labels