{"action":"created","issue":{"url":"https://api.github.com/repos/mossmatters/HybPiper/issues/5","labels_url":"https://api.github.com/repos/mossmatters/HybPiper/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mossmatters/HybPiper/issues/5/comments","events_url":"https://api.github.com/repos/mossmatters/HybPiper/issues/5/events","html_url":"https://github.com/mossmatters/HybPiper/issues/5","id":130465770,"number":5,"title":"SPAdes stack trace failure with large K-mer values","user":{"login":"mossmatters","id":1557809,"avatar_url":"https://avatars.githubusercontent.com/u/1557809?v=3","gravatar_id":"","url":"https://api.github.com/users/mossmatters","html_url":"https://github.com/mossmatters","followers_url":"https://api.github.com/users/mossmatters/followers","following_url":"https://api.github.com/users/mossmatters/following{/other_user}","gists_url":"https://api.github.com/users/mossmatters/gists{/gist_id}","starred_url":"https://api.github.com/users/mossmatters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossmatters/subscriptions","organizations_url":"https://api.github.com/users/mossmatters/orgs","repos_url":"https://api.github.com/users/mossmatters/repos","events_url":"https://api.github.com/users/mossmatters/events{/privacy}","received_events_url":"https://api.github.com/users/mossmatters/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-01T19:53:36Z","updated_at":"2016-02-01T20:07:09Z","closed_at":null,"body":"I discovered that SPAdes will not output a contigs.fasta file if one of the K-mer searches fails, even if the other K-mer searches were successful:\r\n\r\n```\r\nspades.py --12 gene002_interleaved.fasta -o test1 --only-assemble -t 4\r\n\r\n...snip...\r\n== Running assembler: K99\r\n\r\n...snip...\r\n\r\n=== Stack Trace ===\r\n[0x405b7a]\r\n[0x619842]\r\n[0x5f6173]\r\n[0x44a603]\r\n[0x402cde]\r\n[0x41ad76]\r\n[0x7b8170]\r\n[0x4001b9]\r\nVerification of expression 'cov_.size() > 10' failed in function 'void cov_model::KMerCoverageModel::Fit()'. In file '/home/yasha/gitrep3/algorithmic-biology/assembler/src/debruijn/kmer_coverage_model.cpp' on line 185. Message 'Invalid kmer coverage histogram'.\r\nVerification of expression 'cov_.size() > 10' failed in function 'void cov_model::KMerCoverageModel::Fit()'. In file '/home/yasha/gitrep3/algorithmic-biology/assembler/src/debruijn/kmer_coverage_model.cpp' on line 185. Message 'Invalid kmer coverage histogram'.\r\nspades: /home/yasha/gitrep3/algorithmic-biology/assembler/src/debruijn/kmer_coverage_model.cpp:185: void cov_model::KMerCoverageModel::Fit(): Assertion `cov_.size() > 10' failed.\r\n\r\n\r\n== Error ==  system call for: \"['/usr/local/bin/spades', '/scratch/mjohnson/test/gene002/test1/K99/configs/config.info']\" finished abnormally, err code: -6\r\n```\r\n\r\nSPAdes will auto-detect the k-mer values from the read length-- here these are 300 bp paired-end reads, so SPAdes attempts k-mers of 21,33,55,77,99, and 127. SPAdes attempts the assemblies in k-mer order.\r\n\r\nIn the above example, a ```final_contigs.fasta``` file appears in the sub-directories K21, K33, K55, and K77. Only the initial ```configs``` directory appears in K99, and the K127 directory is missing."},"comment":{"url":"https://api.github.com/repos/mossmatters/HybPiper/issues/comments/178165667","html_url":"https://github.com/mossmatters/HybPiper/issues/5#issuecomment-178165667","issue_url":"https://api.github.com/repos/mossmatters/HybPiper/issues/5","id":178165667,"user":{"login":"mossmatters","id":1557809,"avatar_url":"https://avatars.githubusercontent.com/u/1557809?v=3","gravatar_id":"","url":"https://api.github.com/users/mossmatters","html_url":"https://github.com/mossmatters","followers_url":"https://api.github.com/users/mossmatters/followers","following_url":"https://api.github.com/users/mossmatters/following{/other_user}","gists_url":"https://api.github.com/users/mossmatters/gists{/gist_id}","starred_url":"https://api.github.com/users/mossmatters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossmatters/subscriptions","organizations_url":"https://api.github.com/users/mossmatters/orgs","repos_url":"https://api.github.com/users/mossmatters/repos","events_url":"https://api.github.com/users/mossmatters/events{/privacy}","received_events_url":"https://api.github.com/users/mossmatters/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T20:07:09Z","updated_at":"2016-02-01T20:07:09Z","body":"This issue for ARC contains a similar problem: https://github.com/ibest/ARC/issues/22\r\n\r\n> Note that the real reason is not that SPAdes crashes when coverage is low. Here you're only having less than 10 k-mers in the input reads. Assembling 5 or so reads is not a pretty good idea in any case.\r\n\r\nThis may be true for whole-genome assemblies, but not for single genes, as ARC is doing and we are attempting with HybPiper. In addition, the information is there but we are not capturing it because SPAdes does not fail gracefully at high k-mer values when it was perfectly fine at lower k-mer values. \r\n\r\nThe above example finishes fine if the higher level k-mers are excluded, for instance:\r\n\r\n```spades.py --12 gene002_interleaved.fasta -o test2 --only-assemble -t 4 -k 21,33,55,77```\r\n\r\nThe contigs generated by the lower k-mer values are \"probably fine.\" HybPiper should still generate a contig from these assemblies, but right now it will produce no sequence at all if any of the k-mer values fail. "}}