daewoooo / SVbyEye

MIT License
65 stars 5 forks source link

error loading paf file #8

Open DrPintoThe2nd opened 3 months ago

DrPintoThe2nd commented 3 months ago

Hi,

I'm having trouble getting my paf file loaded into R using the readPaf function. The file itself looks fine and I can load it into R using pafr just fine.. any suggestions/thoughts would be helpful! :)

Example load from the tutorial instructions:

> paf.file <- system.file("extdata", "test.paf",
    package = "SVbyEye"
)
> paf.table <- readPaf(
    paf.file = paf.file,
    include.paf.tags = TRUE, restrict.paf.tags = "cg"
)
Error in readPaf(paf.file = paf.file, include.paf.tags = TRUE, restrict.paf.tags = "cg") :
  User defined 'paf.file' doesn't exist!!!
> print(paf.file)
[1] ""

Example instructions from another issue:

> paf_file <- readPaf("test.paf")
[readPaf] Loading PAF file: test.paf ... 0.1s
> paf.table <- readPaf(
    paf.file = paf.file,
    include.paf.tags = TRUE, restrict.paf.tags = "cg"
)
Error in readPaf(paf.file = paf.file, include.paf.tags = TRUE, restrict.paf.tags = "cg") :
  User defined 'paf.file' doesn't exist!!!
> print(paf.file)
[1] ""

Also, here's the minimap2 command used and a couple lines from the paf file:

minimap2 -x asm20 -t 8 -c --eqx --secondary=no chr1.fasta chr2.fasta > test.paf
chr1    19250329    6647820 6648097 +   chr2    41127036    15022639    15022917    264 278 34  NM:i:14 ms:i:204    AS:i:204    nn:i:0  tp:A:P  cm:i:23 s1:i:186    s2:i:152    de:f:0.0504 rl:i:258176 cg:Z:13=2X8=1X93=2X22=1X10=1X7=1X42=1X2=1X18=1X14=1X20=1X3=1D12=
chr1    19250329    15978598    15979401    +   chr2    41127036    20957431    20958274    694 848 28  NM:i:154    ms:i:202    AS:i:139    nn:i:0  tp:A:P  cm:i:8  s1:i:34 s2:i:4773   de:f:0.1379 zd:i:3  rl:i:258176 cg:Z:8=1X5=2X47=4I5=1X12=1X4=2X7=4X19=1X5=1X15=1X6=1X7=1X2=2X18=1X4=2X9=1X6=2X18=1X5=2D9=4X18=2X1=3D2=1X1=1X3=1X1=3X2=1X1=15D1X5=1X26=1X7=1X1=1X6=1X3=1X2=1X2=1X11=23D6=1X8=2X6=1X16=1X7=1X2=1X6=1X14=1X1=1X3=1X4=1X15=1X10=2X7=1X8=1X12=2D7=1X2=1X7=1X23=3X5=1X2=1X11=1X16=1X1=1X7=1X5=1X9=1X5=1X19=1X1=1X2=1X4=1X5=2X9=1I5=2X32=1X4=1X2=1X5=1X13=1X4=1X1=1X8=1X1=1X3=1X17=2X2=1X10=1X3=2X2=1X14=
chr1    19250329    3221220 3221621 +   chr2    41127036    14917614    14918017    363 403 11  NM:i:40 ms:i:202    AS:i:201    nn:i:0  tp:A:P  cm:i:8  s1:i:115    s2:i:106    de:f:0.0970 rl:i:258176 cg:Z:12=1X8=1X8=1X9=1X4=1X6=2X22=1X4=1X10=1X31=1X20=1X23=1X18=1X30=1X10=1X5=1X22=1X3=1X6=1X4=1X10=1X8=1X20=3X7=1X1=1X5=1X5=2X1=2X10=2D1=2X1=1X8=2X31=
chr1    19250329    18676014    18676454    +   chr2    41127036    30710225    30710664    394 441 9   NM:i:47 ms:i:201    AS:i:200    nn:i:0  tp:A:P  cm:i:7  s1:i:59 s2:i:568    de:f:0.1045 zd:i:1  rl:i:258176 cg:Z:10=1X33=1X8=1X8=3X3=1X20=1X12=1X12=1X6=1X7=1X12=1X9=1X12=1X11=1X7=1X1=1X14=2X13=1X4=1X31=1X13=1X8=1X7=1X2=1X10=1X1=2X2=1X5=1X4=2I7=1X6=1X4=1X1=1X16=2X22=1X17=1X6=1X4=1X6=1D2=2X18=
SVN-PhD commented 1 month ago

I was trying something similar in trying to run plotGenome.

What worked for me ultimately was to ignore the 2nd step of the tutorial.

mypaf <- readPaf("test.paf")

plotGenome(paf.table = mypaf)
daewoooo commented 1 month ago

Is it possible to have an example PAF file that you weren't able to load using readPaf() function? Then I can troubleshoot it.