Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input error with mirtop export file #16

Open
kicheolkim opened this issue Apr 17, 2020 · 5 comments
Open

input error with mirtop export file #16

kicheolkim opened this issue Apr 17, 2020 · 5 comments

Comments

@kicheolkim
Copy link

kicheolkim commented Apr 17, 2020

Hi,

I wanted to analyze isomiR output using your isomiRs package. We already set up miRNA pipeline with sRNAbench, so I tried to convert from sRNAbench output to isomiRs input using mirtop.
The sRNAbench output was imported to mirtop, then the gff file export to isomir format. But isomiR package shows an error when I input the files in the R.
Here is the error message:

Error in [.data.frame(table, , c("seq", "freq", "mir", "mism", "add", :
undefined columns selected

I also tried to export as a seqbuster format in mirtop, but now mirtop shows error like below. In the last part "KeyError", miRNA id is different depending on samples.

Traceback (most recent call last):
File "/Users/kicheol/miniconda2/envs/mirna/bin/mirtop", line 10, in
sys.exit(main())
File "/Users/kicheol/miniconda2/envs/mirna/lib/python3.7/site-packages/mirtop/command_line.py", line 45, in main
export(kwargs["args"])
File "/Users/kicheol/miniconda2/envs/mirna/lib/python3.7/site-packages/mirtop/exporter/init.py", line 9, in export
seqbuster.convert(args)
File "/Users/kicheol/miniconda2/envs/mirna/lib/python3.7/site-packages/mirtop/exporter/seqbuster.py", line 29, in convert
_read_file(fn, precursors, matures, args.out)
File "/Users/kicheol/miniconda2/envs/mirna/lib/python3.7/site-packages/mirtop/exporter/seqbuster.py", line 49, in _read_file
matures[attr["Parent"]][attr["Name"]],
KeyError: 'hsa-miR-548av-5p'

Here is my files for your information.

Thanks,
Kicheol

@lpantano
Copy link
Owner

Thank you for the feedback!

sorry about the issue, I can take a look on Monday. Can you try to install the master version of the isomiR package? and make sure you work with the devel version of mirtop, in case you want to try something else meanwhile I can take a look at this.

thanks!

@kicheolkim
Copy link
Author

I'm still seeing the same error message with the develop version...
I will wait for you to look at it and update

Thanks!!

@lpantano
Copy link
Owner

Hi,

When I use:

de <- data.frame(row.names=c("S400001603"),
                 condition = c("cc"))
IsomirDataSeqFromMirtop(read_tsv("~/Downloads/S400001603_rawData.tsv"), de)

that works. Can you check that?

Cheers

@kicheolkim
Copy link
Author

It works now! I didn't know about the "IsomirDataSeqFromMirtop" function.

Thank you!!

@JFsanchezherrero
Copy link

Hi there @lpantano,

I came with an issue in this sense too.

Once I have exported data from miRTop (either using miraligner, optimir or sRNAbench) and I try to use isomiRs R package I get this error:

ids <- isomiRs::IsomirDataSeqFromMirtop(read_tsv(optimir_test_files), de)
Error: Can't subset columns that don't exist.
✖ Locations 2, 7, 6, 5, 4, etc. don't exist.
ℹ There are only 1 column.

Backtrace:

  1. ├─isomiRs::IsomirDataSeqFromMirtop(...)
  2. │ └─isomiRs::IsomirDataSeqFromRawData(mirtop, coldata, ...)
  3. │ └─isomiRs:::.clean_noise(rawdata, pct, whitelist)
  4. │ └─%>%(...)
  5. │ ├─base::withVisible(eval(quote(_fseq(_lhs)), env, env))
  6. │ └─base::eval(quote(_fseq(_lhs)), env, env)
  7. │ └─base::eval(quote(_fseq(_lhs)), env, env)
  8. │ └─isomiRs:::_fseq(_lhs)
  9. │ └─magrittr::freduce(value, _function_list)
  10. │ └─function_list[i]
  11. │ ├─.[, c(1:2, 7:ncol(.))]
  12. │ ├─readr:::[.spec_tbl_df(., , c(1:2, 7:ncol(.)))
  13. │ ├─base::NextMethod([)
  14. │ └─tibble:::[.tbl_df(., , c(1:2, 7:ncol(.)))
  15. │ └─tibble:::tbl_subset_col(x, j = j, j_arg)
  16. │ └─tibble:::vectbl_as_col_index(j, x, j_arg = j_arg)
  17. │ └─tibble:::vectbl_as_col_location(...)
  18. │ ├─tibble:::subclass_col_index_errors(...)
  19. │ │ ├─base::tryCatch(...)
  20. │ │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
  21. │ │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22. │ │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
  23. │ │ └─base::force(expr)
  24. │ └─vctrs::vec_as_location(j, n, names, arg = as_label(j_arg))
  25. └─vctrs:::stop_subscript_oob(...)
  26. └─vctrs:::stop_subscript(...)

I add some information of this example. I have attached the R sessionInfo()
sessionInfo.txt

thanks in advance

head(de)
condition
SRR7218579_trim_joined A
SRR7218580_trim_joined A
SRR7218582_trim_joined B
SRR7218586_trim_joined B

optimir_test_files
[1] "example_PATH/mirtop_export/SRR7218579_optimir.tsv"
[2] "example_PATH/mirtop_export/SRR7218580_optimir.tsv"
[3] "example_PATH/mirtop_export/SRR7218582_optimir.tsv"
[4] "example_PATH/mirtop_export/SRR7218586_optimir.tsv"

head(read.table('example_PATH/mirtop_export/SRR7218579_optimir.tsv'))
V1 V2 V3 V4 V5 V6 V7
1 seq mir mism add t5 t3 SRR7218579_trim_joined
2 TGAGGTAGTAGGTTGTATAG hsa-let-7c-5p 0 AG 0 ggtt 3.0
3 TGAGGTAGTAGGTTGTATAGT hsa-let-7c-5p 0 AGT 0 ggtt 2.0
4 TGAGGTAGTAGGTTGTGTGT hsa-let-7b-5p 0 T 0 gtt 2.0
5 TGAGGTAGTAGGTTGTGTGGG hsa-let-7b-5p 0 G 0 tt 1.0
6 TGAGGTAGTAGGTTGTGTGGC hsa-let-7b-5p 0 C 0 tt 4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants