Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in reading paf file #17

Open
nina-maryn opened this issue Aug 19, 2022 · 3 comments
Open

Error in reading paf file #17

nina-maryn opened this issue Aug 19, 2022 · 3 comments

Comments

@nina-maryn
Copy link

Hello! I am trying to use dotPlotly to compare a PacBio long read de novo assembly (produced with PacBio's assembler IPA) to a reference genome to visualize structural variations. I aligned the assembly to the reference using minimap2. The paf file is full and can be read using R pafr read_paf. I was able to get dotPlotly to work beautifully for my other assembly and a test ref-to-ref alignment, so I know the program works on my cluster setup.

Here is the error I'm getting for my assembly that isn't working:
PARAMETERS:
input (-i): N19_1_158_T1_IPAp_minimap2.paf
output (-o): N19_1_158_T1_IPAp_minimap2.plot
minimum query aggregate alignment length (-q): 3e+05
minimum alignment length (-m): 1000
plot size (-p): 12
show horizontal lines (-l): TRUE
number of reference chromosomes to keep (-k): 10
show % identity (-s): TRUE
show % identity for on-target alignments only (-t): TRUE
produce interactive plot (-x): TRUE
reference IDs to keep (-r):
Error in read.table(opt$input_filename, stringsAsFactors = F, fill = T) :
duplicate 'row.names' are not allowed
No traceback available
Error in colnames(alignments)[1:12] = c("queryID", "queryLen", "queryStart", :
object 'alignments' not found
2: stop("duplicate 'row.names' are not allowed")
1: read.table(opt$input_filename, stringsAsFactors = F, fill = T)
Error: object 'alignments' not found
No traceback available
Error: object 'alignments' not found
No traceback available
Error: object 'alignments' not found
No traceback available
Error: object 'queryStartTemp' not found
No traceback available
Warning message:
In rm(queryStartTemp) : object 'queryStartTemp' not found
Error in nrow(alignments) : object 'alignments' not found
Calls: cat -> paste0 -> nrow
No traceback available
Error in unique(alignments$queryID) : object 'alignments' not found
Calls: cat -> paste0 -> unique
3: nrow(alignments)
2: paste0("\nNumber of alignments: ", nrow(alignments), "\n")
1: cat(paste0("\nNumber of alignments: ", nrow(alignments), "\n"))
Error in tapply(alignments$refEnd, alignments$refID, max) :
object 'alignments' not found
3: unique(alignments$queryID)
2: paste0("Number of query sequences: ", length(unique(alignments$queryID)),
"\n")
1: cat(paste0("Number of query sequences: ", length(unique(alignments$queryID)),
"\n"))
Error in tapply(alignments$lenAln, alignments$queryID, sum) :
object 'alignments' not found
1: tapply(alignments$refEnd, alignments$refID, max)
Error: object 'alignments' not found
1: tapply(alignments$lenAln, alignments$queryID, sum)
Error: object 'alignments' not found
No traceback available
Error in tapply(alignments$lenAln, alignments$queryID, sum) :
object 'alignments' not found
No traceback available
Error: object 'alignments' not found
1: tapply(alignments$lenAln, alignments$queryID, sum)
Error in nrow(alignments) : object 'alignments' not found
Calls: cat -> paste0 -> nrow
No traceback available
Error in unique(alignments$queryID) : object 'alignments' not found
Calls: cat -> paste0 -> unique
3: nrow(alignments)
2: paste0("\nAfter filtering... Number of alignments: ", nrow(alignments),
"\n")
1: cat(paste0("\nAfter filtering... Number of alignments: ", nrow(alignments),
"\n"))
Error in factor(alignments$refID, levels = refIDsToKeepOrdered) :
object 'alignments' not found
3: unique(alignments$queryID)
2: paste0("After filtering... Number of query sequences: ", length(unique(alignments$queryID)),
"\n\n")
1: cat(paste0("After filtering... Number of query sequences: ",
length(unique(alignments$queryID)), "\n\n"))
Error: object 'alignments' not found
1: factor(alignments$refID, levels = refIDsToKeepOrdered)
Error in tapply(alignments$refEnd, alignments$refID, max) :
object 'alignments' not found
No traceback available
Error in levels(alignments$refID) : object 'alignments' not found
1: tapply(alignments$refEnd, alignments$refID, max)
Error in factor(alignments$queryID, levels = unique(as.character(alignments$queryID))) :
object 'alignments' not found
1: levels(alignments$refID)
Error in tapply(alignments$lenAln, alignments$queryID, which.max, simplify = F) :
object 'alignments' not found
1: factor(alignments$queryID, levels = unique(as.character(alignments$queryID)))
Error in factor(alignments$queryID, levels = unique(as.character(alignments$queryID))[order(mapply(function(x, :
object 'alignments' not found
1: tapply(alignments$lenAln, alignments$queryID, which.max, simplify = F)
Error in levels(alignments$queryID) : object 'alignments' not found
Calls: sapply -> lapply -> levels
1: factor(alignments$queryID, levels = unique(as.character(alignments$queryID))[order(mapply(function(x,
i) alignments$refStart2[which(i == alignments$queryID)][x],
queryMaxAlnIndex, names(queryMaxAlnIndex)))])
Error in levels(alignments$refID) : object 'alignments' not found
3: levels(alignments$queryID)
2: lapply(X = X, FUN = FUN, ...)
1: sapply((levels(alignments$queryID)), function(x) tapply(alignments$lenAln[which(alignments$queryID ==
x)], alignments$refID[which(alignments$queryID == x)], sum))
Error in factor(alignments$queryID, levels = (levels(alignments$queryID))[order(match(queryID_Ref, :
object 'alignments' not found
1: levels(alignments$refID)
Error in tapply(alignments$queryEnd - alignments$queryStart, alignments$queryID, :
object 'alignments' not found
1: factor(alignments$queryID, levels = (levels(alignments$queryID))[order(match(queryID_Ref,
levels(alignments$refID)))])
Error: object 'queryRevComp' not found
1: tapply(alignments$queryEnd - alignments$queryStart, alignments$queryID,
function(x) sum(x))
Error in tapply(c(alignments$queryEnd, alignments$queryStart), c(alignments$queryID, :
object 'alignments' not found
No traceback available
Error in levels(alignments$queryID) : object 'alignments' not found
1: tapply(c(alignments$queryEnd, alignments$queryStart), c(alignments$queryID,
alignments$queryID), max)
Error: object 'queryMax' not found
1: levels(alignments$queryID)
Error: object 'queryMax' not found
No traceback available
Error in tapply(c(alignments$queryEnd, alignments$queryStart), c(alignments$queryID, :
object 'alignments' not found
No traceback available
Error in levels(alignments$queryID) : object 'alignments' not found
1: tapply(c(alignments$queryEnd, alignments$queryStart), c(alignments$queryID,
alignments$queryID), min)
Error: object 'alignments' not found
1: levels(alignments$queryID)
Error: object 'alignments' not found
No traceback available
Error in tapply(c(alignments$queryEnd, alignments$queryStart), c(alignments$queryID, :
object 'alignments' not found
No traceback available
Error in levels(alignments$queryID) : object 'alignments' not found
1: tapply(c(alignments$queryEnd, alignments$queryStart), c(alignments$queryID,
alignments$queryID), max)
Error: object 'alignments' not found
1: levels(alignments$queryID)
Error: object 'alignments' not found
No traceback available
Error in levels(alignments$refID) : object 'alignments' not found
No traceback available
Error in tapply(alignments$queryEnd2, alignments$queryID, max) :
object 'alignments' not found
1: levels(alignments$refID)
Error in ggplot(alignments) : object 'alignments' not found
1: tapply(alignments$queryEnd2, alignments$queryID, max)
Error in ggplotly(gp, tooltip = "text") : object 'gp' not found
1: ggplot(alignments)

@ghost
Copy link

ghost commented Feb 14, 2023

Hi, did you manage to fix this?

@Maxim-Karpov
Copy link

Hi, did you manage to fix this?

You can try adding "row.names=NULL" argument to "alignments = read.table(opt$input_filename, stringsAsFactors = F, fill = T)" in the script file.

@tallnuttrbgv
Copy link

Thanks this worked for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants