{"action":"created","issue":{"url":"https://api.github.com/repos/pachterlab/sleuth/issues/76","repository_url":"https://api.github.com/repos/pachterlab/sleuth","labels_url":"https://api.github.com/repos/pachterlab/sleuth/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/pachterlab/sleuth/issues/76/comments","events_url":"https://api.github.com/repos/pachterlab/sleuth/issues/76/events","html_url":"https://github.com/pachterlab/sleuth/issues/76","id":162206536,"number":76,"title":"Error when aggregating on gene level","user":{"login":"seisdrum","id":7275965,"avatar_url":"https://avatars.githubusercontent.com/u/7275965?v=3","gravatar_id":"","url":"https://api.github.com/users/seisdrum","html_url":"https://github.com/seisdrum","followers_url":"https://api.github.com/users/seisdrum/followers","following_url":"https://api.github.com/users/seisdrum/following{/other_user}","gists_url":"https://api.github.com/users/seisdrum/gists{/gist_id}","starred_url":"https://api.github.com/users/seisdrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seisdrum/subscriptions","organizations_url":"https://api.github.com/users/seisdrum/orgs","repos_url":"https://api.github.com/users/seisdrum/repos","events_url":"https://api.github.com/users/seisdrum/events{/privacy}","received_events_url":"https://api.github.com/users/seisdrum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-24T18:42:10Z","updated_at":"2016-07-11T10:26:30Z","closed_at":null,"body":"First of all, thank you for this great tool!\r\nUnfortunately, I'm having problems aggregating results on a gene level. I'm running the current master (048f0551) of sleuth.\r\nI have three conditions with three replicates each.\r\n```r\r\nso <- sleuth_prep(meta, ~condition, filter_fun=ff,\r\n                  target_mapping=t2g, aggregation_column=\"gene_id\")\r\n```\r\n```\r\nreading in kallisto results\r\n.........\r\nnormalizing est_counts\r\n22294 targets passed the filter\r\nnormalizing tpm\r\nmerging in metadata\r\nnormalizing bootstrap samples\r\nsummarizing bootstraps\r\naggregating by column: gene_id\r\nWarning message:\r\nIn parallel::mclapply(seq_along(obj_mod$kal), function(i) {: all scheduled cores encountered errors in user code\r\n\r\nError: is(kal, \"kallisto\") is not TRUE\r\nTraceback:\r\n\r\n1. sleuth_prep(meta, ~condition, filter_fun = ff, target_mapping = t2g, \r\n .     aggregation_column = \"gene_id\")\r\n2. gene_summary(ret, aggregation_column, function(x) log(x + 0.5))\r\n3. sleuth_summarize_bootstrap_col(obj_mod, \"scaled_reads_per_base\", \r\n .     transform)\r\n4. lapply(seq_along(obj$kal), function(i) {\r\n .     cur_samp <- obj$sample_to_covariates$sample[i]\r\n .     dplyr::mutate(summarize_bootstrap(obj$kal[[i]], col, transform), \r\n .         sample = cur_samp)\r\n . })\r\n5. FUN(X[[i]], ...)\r\n6. dplyr::mutate(summarize_bootstrap(obj$kal[[i]], col, transform), \r\n .     sample = cur_samp)\r\n7. mutate_(.data, .dots = lazyeval::lazy_dots(...))\r\n8. summarize_bootstrap(obj$kal[[i]], col, transform)\r\n9. stopifnot(is(kal, \"kallisto\"))\r\n10. stop(sprintf(ngettext(length(r), \"%s is not TRUE\", \"%s are not all TRUE\"), \r\n  .     ch), call. = FALSE, domain = NA)\r\n11. .handleSimpleError(function (e) \r\n  . {\r\n  .     handle_condition(e)\r\n  .     output_handler$error(e)\r\n  . }, \"is(kal, \\\"kallisto\\\") is not TRUE\", quote(NULL))\r\n```\r\nMy mapping t2g looks like this:\r\n```\r\n\ttranscript_id\ttarget_id\tgene_id\tgene_symbol\r\n1\tFBtr0005088 \t19541 \tFBgn0260439 \tPp2A-29B\r\n2\tFBtr0006151 \t86 \tFBgn0000056 \tAdhr\r\n3\tFBtr0070000 \t34057 \tFBgn0031081 \tNep3\r\n4\tFBtr0070001 \t16243 \tFBgn0052826 \ttRNA:CR32826\r\n5\tFBtr0070002 \t34061 \tFBgn0031085 \tCG9570\r\n6\tFBtr0070003 \t17222 \tFBgn0062565 \tOr19b \r\n```\r\nIf I don't do the gene-level aggregation, everything runs smoothly and the output of a wald-test looks like this:\r\n```\r\n\ttarget_id\tpval\tqval\tb\tse_b\tmean_obs\tvar_obs\ttech_var\tsigma_sq\tsmooth_sigma_sq\tfinal_sigma_sq\ttranscript_id\tgene_id\tgene_symbol\r\n1\t30877 \t8.804169e-31\t1.962713e-26\t10.024970 \t0.8691029 \t2.662956 \t25.149691 \t0.0004537218\t0.02142181 \t1.1325560 \t1.1325560 \tFBtr0079801 \tFBgn0026439 \tEaat1\r\n2\t17265 \t5.513871e-21\t6.146036e-17\t3.648721 \t0.3882075 \t5.161134 \t4.335836 \t0.0163544481\t0.04416542 \t0.2097031 \t0.2097031 \tFBtr0086675 \tFBgn0063493 \tGstE7\r\n3\t1354 \t1.482594e-11\t1.101716e-07\t2.723616 \t0.4035230 \t5.139832 \t2.205928 \t0.0218944209\t0.22235180 \t0.2116725 \t0.2223518 \tFBtr0081031 \tFBgn0002939 \tninaD\r\n4\t2371 \t1.601545e-10\t8.925810e-07\t6.421011 \t1.0040087 \t1.447888 \t10.353127 \t0.0011504147\t0.05795076 \t1.5108997 \t1.5108997 \tFBtr0301695 \tFBgn0032549 \tCG4650\r\n5\t29197 \t3.790233e-10\t1.689913e-06\t2.666618 \t0.4258120 \t4.815232 \t1.776628 \t0.0217479844\t0.17303949 \t0.2502258 \t0.2502258 \tFBtr0071848 \tFBgn0017482 \tT3dh\r\n6\t6927 \t8.573559e-09\t3.185506e-05\t5.576460 \t0.9686776 \t3.042066 \t7.964823 \t0.4213412076\t-0.26613159 \t0.9861632 \t0.9861632 \tFBtr0075919 \tFBgn0036305 \tCG10984 \r\n```\r\nAny ideas what I could do?"},"comment":{"url":"https://api.github.com/repos/pachterlab/sleuth/issues/comments/231697845","html_url":"https://github.com/pachterlab/sleuth/issues/76#issuecomment-231697845","issue_url":"https://api.github.com/repos/pachterlab/sleuth/issues/76","id":231697845,"user":{"login":"jaquol","id":7597531,"avatar_url":"https://avatars.githubusercontent.com/u/7597531?v=3","gravatar_id":"","url":"https://api.github.com/users/jaquol","html_url":"https://github.com/jaquol","followers_url":"https://api.github.com/users/jaquol/followers","following_url":"https://api.github.com/users/jaquol/following{/other_user}","gists_url":"https://api.github.com/users/jaquol/gists{/gist_id}","starred_url":"https://api.github.com/users/jaquol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaquol/subscriptions","organizations_url":"https://api.github.com/users/jaquol/orgs","repos_url":"https://api.github.com/users/jaquol/repos","events_url":"https://api.github.com/users/jaquol/events{/privacy}","received_events_url":"https://api.github.com/users/jaquol/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T10:26:29Z","updated_at":"2016-07-11T10:26:29Z","body":"Hi,\r\n\r\nI reiterate @seisdrum congratulations!\r\n\r\nI got a similar error.\r\n\r\nMy `t2g` table looks like this:\r\n```\r\n                                                                                                                                  target_id\r\n1              ENST00000456328.2|ENSG00000223972.5|OTTHUMG00000000961.2|OTTHUMT00000362751.1|DDX11L1-002|DDX11L1|1657|processed_transcript|\r\n2 ENST00000450305.2|ENSG00000223972.5|OTTHUMG00000000961.2|OTTHUMT00000002844.2|DDX11L1-001|DDX11L1|632|transcribed_unprocessed_pseudogene|\r\n3              ENST00000488147.1|ENSG00000227232.5|OTTHUMG00000000958.1|OTTHUMT00000002839.1|WASH7P-001|WASH7P|1351|unprocessed_pseudogene|\r\n4                                                                 ENST00000619216.1|ENSG00000278267.1|-|-|MIR6859-1-201|MIR6859-1|68|miRNA|\r\n5                  ENST00000473358.1|ENSG00000243485.3|OTTHUMG00000000959.2|OTTHUMT00000002840.1|RP11-34P13.3-001|RP11-34P13.3|712|lincRNA|\r\n6                  ENST00000469289.1|ENSG00000243485.3|OTTHUMG00000000959.2|OTTHUMT00000002841.2|RP11-34P13.3-002|RP11-34P13.3|535|lincRNA|\r\n      transcript_id          ens_gene                          gene_type\r\n1 ENST00000456328.2 ENSG00000223972.5               processed_transcript\r\n2 ENST00000450305.2 ENSG00000223972.5 transcribed_unprocessed_pseudogene\r\n3 ENST00000488147.1 ENSG00000227232.5             unprocessed_pseudogene\r\n4 ENST00000619216.1 ENSG00000278267.1                              miRNA\r\n5 ENST00000473358.1 ENSG00000243485.3                            lincRNA\r\n6 ENST00000469289.1 ENSG00000243485.3                            lincRNA\r\n```\r\n\r\nAnd when I run this:\r\n```\r\n so <- sleuth_prep(tab_metadata, ~ condition, target_mapping = t2g, aggregation_column = 'ens_gene')\r\n```\r\n\r\nI get the following errors:\r\n```\r\nError in sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) : \r\n  long vectors not supported yet: fork.c:376\r\nIn addition: Warning messages:\r\n1: In inner_join_impl(x, y, by$x, by$y, suffix$x, suffix$y) :\r\n  joining character vector and factor, coercing into character vector\r\n2: In left_join_impl(x, y, by$x, by$y, suffix$x, suffix$y) :\r\n  joining factor and character vector, coercing into character vector\r\nError: is(kal, \"kallisto\") is not TRUE\r\nIn addition: Warning messages:\r\n1: In inner_join_impl(x, y, by$x, by$y, suffix$x, suffix$y) :\r\n  joining character vector and factor, coercing into character vector\r\n2: In left_join_impl(x, y, by$x, by$y, suffix$x, suffix$y) :\r\n  joining factor and character vector, coercing into character vector\r\n3: In parallel::mclapply(seq_along(obj_mod$kal), function(i) { :\r\n  scheduled core 1 encountered error in user code, all values of the job will be affected\r\n```\r\n\r\nThe first error may be produced by the fact that the values in the `target_id` field are rather long. If this is the case, do you think it can be easily fixed on your end, please? Otherwise I would need to re-name headers in the multi-FASTA file I use for making Kallisto's index, re-run Kallisto on my samples...\r\n\r\nThanks in advance!"}}
{"actor":{"display_login":"jaquol"}}