lauramilena3 / On-rep-seq

Bulk Typing of Bacterial Species down to Strain Level
MIT License
4 stars 3 forks source link

Error in peak finding: peakPicker.R #10

Closed AlexGaithuma closed 4 years ago

AlexGaithuma commented 4 years ago

I am running into an error running the command:

Rscript --vanilla scripts/peakpicker.R -f repBC11.txt -o peaks_repBC11.txt -v TRUE 

returns an error:

Error in int$stspts:int$endpts : argument of length 0
Calls: findPeaks
In addition: Warning message:
In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
k-d tree limited by memory. ncmax= 278
Execution halted

what could be the problem?

repBC11.txt contents are:

2 219 2 226 2 233 2 241 2 243 2 244 4 246 2 249 2 251 2 257 2 260 2 261 2 264 2 265 2 270 2 273 2 278 2 282 2 284 2 294 2 298 2 299 2 301 2 302 2 304 2 309 4 317 2 330 2 334 2 337 4 338 4 339 2 347 2 348 2 350 4 369 2 376 2 381 2 383 2 399 4 404 2 408 2 409 4 412 4 414 2 417 2 424 4 425 2 427 2 429 2 435 2 442 2 443 2 445 2 447 2 448 2 451 2 454 2 455 2 457 2 459 2 471 2 475 2 477 2 480 2 485 2 488 2 495 2 498 2 503 2 504 2 505 2 508 6 514 2 516 2 517 2 519 2 520 4 525 2 528 2 529 4 535 2 536 2 537 6 538 2 540 2 541 4 542 2 544 2 545 2 547 4 548 2 549 4 550 4 551 2 552 2 554 4 555 2 557 2 558 2 560 2 561 2 563 4 564 2 565 10 566 4 567 2 570 6 571 2 575 4 576 2 577 6 578 2 580 4 584 6 585 6 586 8 587 8 588 8 590 4 591 8 592 8 593 12 594 6 595 10 596 4 597 12 598 10 599 6 600 8 601 10 602 12 603 4 604 4 605 24 606 12 607 8 608 8 609 14 610 6 611 8 612 12 613 12 614 16 615 8 616 14 617 10 618 2 619 10 620 22 621 14 622 10 623 6 624 12 625 18 626 12 627 22 628 26 629 22 630 16 631 22 632 10 633 14 634 10 635 8 636 14 637 30 638 16 639 14 640 12 641 16 642 14 643 18 644 16 645 12 646 20 647 24 648 24 649 16 650 20 651 14 652 10 653 26 654 20 655 6 656 22 657 24 658 18 659 26 660 30 661 24 662 42 663 32 664 30 665 20 666 24 667 30 668 14 669 18 670 18 671 20 672 24 673 20 674 16 675 18 676 12 677 26 678 20 679 24 680 14 681 16 682 10 683 24 684 14 685 8 686 24 687 12 688 30 689 16 690 10 691 4 692 16 693 16 694 20 695 12 696 18 697 6 698 10 699 12 700 4 701 6 702 6 703 2 704 2 705 2 707 10 708 2 709 6 710 6 711 8 714 4 715 2 716 2 720 2 727 2 730 2 734 2 736 2 743 2 755 2 756 2 772 2 787 2 806 2 890 2 915 2 916 2 926 2 929 2 930 2 938 2 939 2 940 2 952 2 956 2 957 2 961 2 968 2 1016 2 1045 2 1057 2 1117 2 1128 2 1204 2 1257 2 1277 2 1313 2 1326

lauramilena3 commented 4 years ago

It appears to be failing at getting the interval in this line: int <- intervals[rowSums(sign(intervals - i))==0,]

int is getting assigned an empty dataframe: [1] stspts endpts

<0 rows> (or 0-length row.names) @macieksk, could you please take a look at this issue?
macieksk commented 4 years ago

Hi @lauramilena3 This is code by @LukaszKrych and his team, maybe someone from there can have a look? Although I'm looking into this now.

macieksk commented 4 years ago

Hi @AlexGaithuma , please try with the latest fix in the master branch, it should work with your example. Thanks for reporting this.

AlexGaithuma commented 4 years ago

Hi @AlexGaithuma , please try with the latest fix in the master branch, it should work with your example. Thanks for reporting this.

Thanks @macieksk. It now works!