xref_regions | R Documentation |
But I was asked to get the closest feature if it is not inside one. I am not sure how to do that with a ranges. Sadly, I think it will be easier for me to just iterate over the sequence_df and query each feature on that chromosome/scaffold.
xref_regions(
sequence_df,
gff,
bin_width = 600,
feature_type = "protein_coding_gene",
feature_start = "start",
feature_end = "end",
feature_strand = "strand",
feature_chr = "seqnames",
feature_type_column = "type",
feature_id = "ID",
feature_name = "description",
name_type = NULL,
desc_column = "description"
)
sequence_df |
dataframe of sequence regions of interest. |
gff |
gff annotations against which to hunt. |
bin_width |
size of the regions of interest (e.g. the amplicon size) |
feature_type |
What feature type to hunt for? |
feature_start |
Column containing the starts. |
feature_end |
Column containing the ends. |
feature_strand |
Column containing strand information. |
feature_chr |
Column containing the chromosome names. |
feature_type_column |
Column containing the feature types. |
feature_id |
Column with the IDs (coming from the gff tags). |
feature_name |
Column with the descriptive name. |
name_type |
I dont remember, I think this allows one to limit the search to a feature type. |
desc_column |
Use this column to extract full-text gene descriptions. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.