Skip to content
Snippets Groups Projects
Commit 421d7b8f authored by Christian Arnold's avatar Christian Arnold
Browse files

Documentation updates & Bugfix prepareBinning

parent b98acbb7
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -127,14 +127,16 @@ for (permutationCur in 0:par.l$nPermutations) {
fileCur = par.l$files_input_nucContentGenome[permutationCur+1]
TF.motifs.CG.cur = read_tsv(fileCur, col_names = TRUE, col_types = cols())
colnames(TF.motifs.CG.cur) = c("chr","MSS","MES","strand","TF","AT","CG","A","C","G","T","N","other_nucl","length")
nRowsNA = length(which(is.na(TF.motifs.CG.cur$CG)))
if (nRowsNA > 0) {
message <- paste0("The file ", fileCur, " contains ", nRowsNA, " rows out of ", nrow(TF.motifs.CG.cur), " with a missing value for the CG content, which most likely results from an assembly discordance between the BAM files and the specified fasta file. The first 10 are printed with their first 3 columns here for debugging purposes:")
message <- paste0("The file ", fileCur, " contains ", nRowsNA, " rows out of ", nrow(TF.motifs.CG.cur), " with a missing value for the CG content, which most likely results from an assembly discordance between the BAM files and the specified fasta file. These regions will be removed in subsequent steps. The first 10 are printed with their first 3 columns here for debugging purposes:")
message = paste0(message, paste0(unlist(TF.motifs.CG.cur[1:10,"chr"]), ":", unlist(TF.motifs.CG.cur[1:10,"MSS"]), "-", unlist(TF.motifs.CG.cur[1:10,"MES"]), collapse = ", "))
checkAndLogWarningsAndErrors(NULL, message, isWarning = TRUE)
TF.motifs.CG.cur = TF.motifs.CG.cur[-nRowsNA,]
}
colnames(TF.motifs.CG.cur) = c("chr","MSS","MES","strand","TF","AT","CG","A","C","G","T","N","other_nucl","length")
TF.motifs.CG.cur$permutation = permutationCur
......@@ -147,13 +149,6 @@ for (permutationCur in 0:par.l$nPermutations) {
}
# Check for NA values in the CG column, indicating some kind of assembly problem with the fasta file.
if () {
message = paste0("The file ", par.l$files_input_nucContentGenome[permutationCur+1], " is empty. Something went wrong before. Make sure the previous steps succeeded.")
flog.fatal(message)
stop(message)
}
TF.motifs.CG$CG.identifier = paste0(TF.motifs.CG$TF,":" ,TF.motifs.CG$chr ,":", TF.motifs.CG$MSS, "-", TF.motifs.CG$MES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment