Skip to content

Issue with runHawk and R scripts #12

Open

Description

@standage

Greetings! I encountered the following error message while running runHawk.

Loading required package: iterators
Loading required package: parallel
      [,1]
[1,]    1
[2,]    0
[3,]    0

Error in { : 
  task 1 failed - "variable lengths differ (found for 'totals[, 1]')"
Calls: %dopar% -> <Anonymous>
Execution halted

It looks like it's related to one of the R scripts, but other than that the error message provides very few clues to assist with debugging. Do you have any ideas what problem this message might indicate?

Thanks!

Activity

  1. atifrahman commented on Feb 22, 2019

    @atifrahman
    Owner

    Are you experimenting with a subset of samples? It seems to me that the file "total_kmer_counts.txt" has more or less entries than the number of samples. That would cause glm (line 85) to fail.

  2. standage commented on Feb 22, 2019

    @standage
    Author

    No, for this analysis I'm looking at 3 samples (1 case, 2 controls) and I am using all samples.

    (By the way, before this error message I was running into another error message that wasn't fixed until I changed the 10 on this line to 3. If that is a variable corresponding to the number of samples, it would be very helpful to document for new users.)

    I attempted to print the lengths of the different components of the glm call to help with debugging, but I'm getting no output. I added the following line right before the glm call on line 85.

    cat(sprintf("DEBUG Y=%d Z[,1]=%d Z[,2]=%d totals[,1]=%d counts=%d", length(Y), length(Z[,1]), length(Z[,2]), length(totals[,1]), length(counts)))
    

    I did note that total_kmer_counts.txt contains 4 lines, although there are only 3 samples in my analysis. The 4th line contains the largest count, so I assumed it was the count of the union of all samples. Is this an issue perhaps?

  3. MikeEHMatson commented on Mar 12, 2019

    @MikeEHMatson

    I'm also getting an error on the same step.

    Similar to what @standage suggested, I needed to change the 10 to a 2 on line 24 of runHawk, since my sample size is 2 (and not 10, presumably), in order to advance the script to when they received the error message.

    My error message, including a few of the preceding stdout lines, is:

    .
    .
    .
    4607182418800017408
    4611686018427387904
    70210565
    0
    Loading required package: iterators
    Loading required package: parallel
         [,1]
    [1,]    1
    [2,]    0
    Error in { : 
      task 1 failed - "Argument mu must be a nonempty numeric vector"
    Calls: %dopar% -> <Anonymous>
    Execution halted
    Loading required package: iterators
    Loading required package: parallel
         [,1]
    [1,]    1
    [2,]    0
    Error in { : 
      task 1 failed - "Argument mu must be a nonempty numeric vector"
    Calls: %dopar% -> <Anonymous>
    Execution halted
    

    I'm not sure what script this is referring to, so I'm having trouble tracing the error. Any insights would be appreciated.

  4. atifrahman commented on Mar 13, 2019

    @atifrahman
    Owner

    Oh sorry! Missed this earlier.

    That 10 is actually the number of PCs and need not be modified.

    It must be in one of the library functions since the script doesn't have a vector named mu. I'll try to figure out where. We have actually developed C/C++ code for this step. Hope to upload that soon after some testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions