Comments (4)
Hi Alexandre,
you are on the right track. Two ways to do this.
- You can add columns
start
andend
to yourall_seqs
.
all_seqs <- mutate(start=c(50000,500000,1000000, ...), end=c(110000,560000,1060000, ...)
- You can provide a table with locus coordinates for all your sequences (contigs) to focus.
You can use focus for this like this:
loci <- tribble(
~seq_id, ~start, ~end,
"genome1", 50000, 110000, # probably more realistic would be genomeA_contig1 or so
"genome2", 500000, 560000,
# ...
)
gggenomes(...) |> focus(.loci=loci)
Hope that helps
from gggenomes.
Thank you for the answer!
I did try the first method, because the second one, with many genes in the region, might be too tedious.
So:
all_seqs <- mutate(start=c(50000,500000,1000000, ...), end=c(110000,560000,1060000, ...)
But I get the error message
Error in UseMethod("mutate") :
no applicable method for 'mutate' applied to an object of class "c('double', 'numeric')"
When I look at my all_seqs file, it looks like this:
file_id seq_id seq_desc length
1 6genomes g1 NA 3836532
2 6genomes g2 NA 3937483
3 6genomes g3 NA 3750370
4 6genomes g4 NA 3995103
5 6genomes g5 NA 4006609
6 6genomes g6 NA 3980852
I thought about cutting the fasta files directly and loading only the fractions of the genomes I am interested in, but I am afraid it will then be messy to format the gff files according to the positions.
Cheers,
Alexandre
from gggenomes.
Hello again,
Sorry for the previous post, I fixed the issue by simply changing the line to:
all_seqs %>% mutate(start=c(50000,500000,1000000, ...), end=c(110000,560000,1060000, ...)
and it worked as I now have two extra columns in the all_seqs object.
However, how can I tell gggenomes to now only plot those regions rather than the entire genome ?
Cheers,
Alexandre
from gggenomes.
You need to give all_seqs
with added start,end
as seqs to gggenomes.
all_seqs_<-read_seqs('6genomes.fa',.id='file_id')
all_genomes_genes <- read_gff("genomes.gff")
plot1 <- gggenomes(seq=A118_seqs, A118_genes)
plot1
all_loci <- all_seqs %>% mutate(start=c(50000,500000,1000000, ...), end=c(110000,560000,1060000, ...)
plot2 <- gggenomes(seq=all_loci, all_genes)
plot2
from gggenomes.
Related Issues (20)
- geom_link new error HOT 2
- Strand error when call gggenome()
- Submission for JOSS?
- Errror while installing HOT 1
- ggplot2 error using example data HOT 6
- Installation error HOT 3
- fill and fontface otions for geom_gene_label HOT 4
- Move deps from Depends to Imports? HOT 1
- Adding UTRs in the plot HOT 3
- Genes do not start and end at the expected positions HOT 2
- Setting coordinates to visualise part of the genome HOT 1
- shitf() "unused argument" HOT 2
- geom_gene() doesn't work HOT 5
- Errors when running read_feats command HOT 3
- Change space between seqs within the same bin HOT 5
- 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
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.