Closed angarb closed 1 year ago
This part of the post processing script is causing problems:
b1_list <- t(read.table(b1_file, sep=","))
b2_list <- t(read.table(b2_file, sep=","))
bam_list_df <- merge(b1_list, b2_list, by="row.names", suffixes = c("_b1", "_b2"))
bam_list_df <- bam_list_df[,-1]
colnames(bam_list_df) <- lapply(colnames(bam_list_df), function(x){
new_val <- strsplit(x, "_")[[1]][2]
return(new_val)
})
It currently reorders the row.names to look like this:
This seems to fix this issue: bam_list_df <- merge(b1_list, b2_list, by="row.names", all= T, sort = F, suffixes = c("_b1", "_b2"))
Problem
There is a bug in the generation of the BamList. If there are more than 10 samples in b1 or b2 - the Bamlist gets disordered.
Solution