dwinter / pafr

Read, manipulate and visualize 'Pairwise mApping Format' data in R
Other
67 stars 10 forks source link

read_paf retrieving only NAs #45

Open smartise opened 4 months ago

smartise commented 4 months ago

hello everyone.

I am trying to read a paf file that I obtained using minimap2 but can only get a data frame full of NA

here is the command I used for minimap2. minimap2 -ax map-ont --secondary=no /mnt/ebe/Niphargus/schellenbergi/wtdbg2/wtdbg2_filtlong.ctg.lay.fasta barcode05.fastq > output.paf

and here is the code and the error I get

paf_data <- read_paf("output.paf") Warning in .make_numeric(as.data.frame(res), c(2, 3, 4, 7:12)) : NAs introduced by coercion Warning in .make_numeric(as.data.frame(res), c(2, 3, 4, 7:12)) : NAs introduced by coercion Warning in .make_numeric(as.data.frame(res), c(2, 3, 4, 7:12)) : NAs introduced by coercion Warning in .make_numeric(as.data.frame(res), c(2, 3, 4, 7:12)) : NAs introduced by coercion Warning in .make_numeric(as.data.frame(res), c(2, 3, 4, 7:12)) : NAs introduced by coercion Warning in .make_numeric(as.data.frame(res), c(2, 3, 4, 7:12)) : NAs introduced by coercion Warning in .make_numeric(as.data.frame(res), c(2, 3, 4, 7:12)) : NAs introduced by coercion

any idea how to get through this ?

cjfields commented 5 days ago

Seeing the same, but using mashmap PAF. It looks like a parsing bug. The first few lines in the mashmap PAF I'm using:

atg000001l      43020   0       43020   -       Ms71#1#chr5     227125645       166260391       166303329       18      43020   38      id:f:0.999848   kc:f:1.15873
atg000002l      35925   0       35000   +       Ms71#1#chr6     180226282       154859221       154894505       17      35284   255     id:f:1  kc:f:0.905393
atg000002l      35925   30925   35925   +       Ms71#1#chr6     180226282       154890470       154895470       18      5000    255     id:f:1  kc:f:0.897529
atg000003l      22430   0       22430   -       Ms71#1#chr2     243655927       164760286       164782829       20      22543   255     id:f:1  kc:f:0.860123
atg000004l      2406809 0       20000   +       Ms71#1#chr6     180226282       152030511       152048756       7       20000   21      id:f:0.991506   kc:f:1.21793
atg000004l      2406809 20000   30000   +       Ms71#1#chr5     227125645       110036962       110046910       11      10000   17      id:f:0.982112   kc:f:1.13443

And the snapshot of the pafr object tibble when loading this:

image

The last two columns are borked.