I am using iCAMP in R and I have a large list called phylobin which contains information on phylogenetic tree bins and their corresponding ASV ids. In phylobin I have phylobin[["sp.bin"]] and phylobin[["bin.united.sp"]] which contain ASV ids as rownames and bin numbers as columns and a list of all bins and the ids of ASVs they contain, respectively. I want to create a new list of all bins but change out ASV ids for bin.id.new (contained as a col value in phylobin[["bin.united.sp"]]) integer values.
If you are familiar with iCAMP, I want a pdid.bin list.
Here is a snapshot of my data:
> dput(head(phylobin[["sp.bin"]]))
structure(list(bin.id.strict = 1:6, bin.id.united = c(5155L,
5155L, 5155L, 5155L, 5155L, 5155L), bin.id.new = c(1, 1, 1, 1,
1, 1)), row.names = c("58280213177cd49ae003f799669083b1", "49da809110cfb2291f15aa751868f909",
"dda715fd5e83bd6706ccb377023a7b04", "d22c52adf22aaab347d1de64bc394ab4",
"11e64c80d5ba65bae3e2061c1a71deeb", "ba2e725cf081c898027196308f0b9279"
), class = "data.frame")
> dput(head(phylobin[["bin.united.sp"]]))
list(c("58280213177cd49ae003f799669083b1", "49da809110cfb2291f15aa751868f909",
"dda715fd5e83bd6706ccb377023a7b04", "d22c52adf22aaab347d1de64bc394ab4",
"11e64c80d5ba65bae3e2061c1a71deeb", "ba2e725cf081c898027196308f0b9279"))
Perhaps this?
(I'm not familiar with
pdid.binformats.)