Description
Hi,
I try to follow the steps for chapter"Peak2GeneLinkage with ArchR" using the turorial data.
After run the first step:
projHeme5 <- addPeak2GeneLinks(
ArchRProj = projHeme5,
reducedDims = "IterativeLSI"
)
I got this log file:
ArchR-addPeak2GeneLinks-c9f637af053-Date-2020-11-27_Time-12-49-47.log
However, when I run next step:
p2g <- getPeak2GeneLinks(
ArchRProj = projHeme5,
corCutOff = 0.45,
resolution = 1,
returnLoops = TRUE
)
I got an error message:
Error in .validInput(input = start, name = "start", valid = c("integer")) :
Input value for 'start' is not a integer, (start = numeric) please supply valid input!
In addition: Warning message:
In min(abs(c(input%%1, input%%1 - 1)), na.rm = TRUE) :
no non-missing arguments to min; returning Inf
Is there anyone could help me to solve this problem? Thanks a lot!
Activity
rcorces commentedon Nov 27, 2020
I cannot reproduce your error. Perhaps you have missed some steps in the tutorial, such as adding a peak set or a peak matrix.
YanFang0620 commentedon Nov 27, 2020
Thank you for your reply!
I checked the available matrix in projHeme5:
It seems like there already added a PeakMatrix in the ArchRProject.
So how could I check whether there's any peak set in my ArchRProject?
YanFang0620 commentedon Nov 27, 2020
I also tried to check:
seqinfo: 23 sequences from an unspecified genome; no seqlengths
So there should be peak set in the ArchRProject.
Actually, all of steps were ran smoothly except the getPeak2GeneLinks() step.
rcorces commentedon Nov 28, 2020
Can you run the following code line by line and tell me what happens?
YanFang0620 commentedon Nov 28, 2020
Hi, I ran the code line by line,and finally I got the loops:
rcorces commentedon Nov 28, 2020
That just doesnt make sense to me.
If you are running this command:
EDIT NOTE: The below is actually not correct. Copy-paste error.
Then the below code is exactly what is being run. If you can run this and it doesnt return an error, then you should try to re-run your original command.
YanFang0620 commentedon Nov 28, 2020
Thank you so much for your suggestion.
However, if I try to run the original codes you provide above,finally I got an error:
rcorces commentedon Nov 29, 2020
Of course you cannot run the line that says return(loops) because you are not in a function to return from. Can you run the code line by line instead?
Also, have you tried re-running your original command:
YanFang0620 commentedon Nov 29, 2020
If I run:
It still showed me:
rcorces commentedon Nov 29, 2020
What happens when you run all of this code? It should print one number (1 - 4).
YanFang0620 commentedon Nov 29, 2020
It didn't print 1-4. It showed me:
rcorces commentedon Nov 29, 2020
Ok well at least that is consistent. Try this:
run this code:
Then show me the output of each of these lines:
YanFang0620 commentedon Nov 29, 2020
The following are the output I got:
rcorces commentedon Nov 29, 2020
Ok. That shows where the problem is coming from. Show me:
metadata(projHeme5@peakSet)$Peak2GeneLinks
YanFang0620 commentedon Nov 29, 2020
rcorces commentedon Nov 29, 2020
I guess I owe you an apology. Sorry - this is related to the issue #385 where you originally posted but I didnt catch it until now. As in that issue, the FDRs are all NaN.
So this line:
p2g <- p2g[which(p2g$Correlation >= corCutOff & p2g$FDR <= FDRCutOff), ,drop=FALSE]
is causing p2g to be empty which causes your error.
I'm going to close this and we can continue the discussion on the previous thread. Sorry that this is not working at the moment. We will get it fixed.
jgranja24 commentedon Nov 29, 2020
Sorry I think the bug is now fixed in the new release branch -----
To install --
devtools::install_github("GreenleafLab/ArchR", ref="release_1.0.1", repos = BiocManager::repositories())
The change --
o$TStat <- (o$Correlation / sqrt((pmax(1-o$Correlation^2, 0.00000000000000001, na.rm = TRUE))/(ncol(seATAC)-2))) #T-statistic P-value
YanFang0620 commentedon Nov 29, 2020
No, its OK. Thank you so much for your patience and let me know about this.
Hope it could be fixed soon. This is a really great package for scATAC-seq analysis!
sylestiel commentedon Dec 4, 2020
@rcorces
If installation of the revised version is the solution it is still not addressing the problem for me.
devtools::install_github("GreenleafLab/ArchR", ref="release_1.0.1", repos = BiocManager::repositories())
rcorces commentedon Dec 4, 2020
That doesnt sound possible. did you re-run
addPeak2GeneLinks()
as I suggested?sylestiel commentedon Dec 4, 2020
I just did it and still does not work!!

sylestiel commentedon Dec 4, 2020
jgranja24 commentedon Dec 4, 2020
Can you copy the output if you paste
addPeak2GeneLinks
into R which returns the function. Are you sure you reset your r session and reloading ArchR?rcorces commentedon Dec 4, 2020
@sylestiel - "it doesnt work" is relative. It is no longer giving you the error and the function is running to completion.
sylestiel commentedon Dec 4, 2020
jgranja24 commentedon Dec 4, 2020
You need to reload R and ArchR.
This issue has been fixed in the branch you are referring to (See Above) --
sylestiel commentedon Dec 4, 2020
Ok. Many Thanks!!! I will do that.