Comments (5)
This makes a lot of sense. I'll go for it. One thing I'm not sure about is whether to use the format "ambiguous". The json format is certainly not unique to AliTV. However, gggenomes currently doesn't support any other input data in json format. So I think we could interpret any json as AliTV for now but at the risk of having to move it to ambiguous later and breaking backwards compatibility. What do you think @thackl ?
from gggenomes.
Not sure what's going wrong here: https://github.com/iimog/gggenomes/tree/smart-alitv . The correct alitv
functions are called but for some reason the map2_df
fails to create the output table. I don't know why that happens and could not fix it. @thackl do you have any idea why that occurs. As you see, calling the read_alitv_genes
function directly works fine.
> s <- read_seqs("https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json")
Reading as alitv:
* chloroplasts [https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json]
Error: Internal error in `vec_assign()`: `value` should have been recycled to fit `x`.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/rlang_error>
Internal error in `vec_assign()`: `value` should have been recycled to fit `x`.
Backtrace:
1. gggenomes::read_seqs("https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json")
2. purrr::map2_df(...)
3. dplyr::bind_rows(res, .id = .id)
4. vctrs::vec_rbind(!!!dots, .names_to = .id)
Run `rlang::last_trace()` to see the full context.
> f <- read_feats("https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json")
Reading as alitv:
* chloroplasts [https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json]
Error: Internal error in `vec_assign()`: `value` should have been recycled to fit `x`.
Run `rlang::last_error()` to see where the error occurred.
> l <- read_links("https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json")
Reading as alitv:
* chloroplasts [https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json]
Error: Internal error in `vec_assign()`: `value` should have been recycled to fit `x`.
Run `rlang::last_error()` to see where the error occurred.
> gggenomes:::read_alitv_genes("https://alitvteam.github.io/AliTV/d3/data/chloroplasts.json")
# A tibble: 101 x 5
seq_id start end name class
<chr> <int> <int> <chr> <chr>
1 Cphe_gi 18916 19290 ycf4 ycf
2 Cphe_gi 38014 44974 ycf2 ycf
3 Cphe_gi 59962 60067 ycf1 ycf
4 Cphe_gi 89015 82055 ycf2 ycf
5 Evir_gi 22044 28695 ycf2 ycf
6 Evir_gi 67783 61132 ycf2 ycf
7 Lphi_gi 45475 45351 ycf3 ycf
8 Lphi_gi 44641 44411 ycf3 ycf
9 Lphi_gi 43675 43522 ycf3 ycf
10 Lphi_gi 61418 61973 ycf4 ycf
# … with 91 more rows
from gggenomes.
Yes, I think there is an issue with the format. Your second code line says Reading as alitv
, which would call read_alitv
but you probably want to have Reading as alitv_seqs
to call read_alitv_seqs
. I think you are currently feeding the output list of read_alitv
directly to the map function in all three calls - always causing the same error.
That said, this kind of makes me wonder if the way I've said this up so far, actually makes sense - actually, I think it is definitely flawed. Obviously, it would make more sense to have the format for read_seqs("alitv.json")
to be "alitv", and have the read_seqs
function somehow add the right context... I need to think about this some more...
from gggenomes.
You were right. Calling alitv_seqs
instead of alitv
fixes it 🎉
At least for seqs and feats. Links are still interpreted as genes (as you already mentioned in the initial issue text). Anyway, I'll wait until you decided on how you want these smart functions to be handled. Should be straightforward for alitv
then.
from gggenomes.
resolved by #37
from gggenomes.
Related Issues (20)
- Changing gene colours HOT 2
- ! Required column(s) missing: • length HOT 2
- breaks to sequences with geom_break() HOT 1
- Error in read_feats HOT 4
- Draw a combined plot with ggtree and gggenomes HOT 3
- Error using continuous fill of geom_link() at same time as discrete fill of geom_gene() HOT 2
- Introducing sequence breaks? HOT 8
- shift example broken
- switch to R 4.1.2 and R pipe HOT 1
- Fix logo
- Remove thacklr dependency
- switch from size to linewidth for line geoms
- how to remove link borders? HOT 2
- Error in Installation HOT 4
- read_seqs() function not working for me HOT 8
- Unused parameter in drop_feat_layout HOT 2
- Operon boxes HOT 2
- Different genome scales 2
- Show y-axis for geom_wiggle() and offset geom_feat() HOT 1
- ggsave throws error in example code HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gggenomes.