I want to output a file in R where I will print the longest locus.
0
0
Entering edit mode
2.2 years ago
logbio ▴ 30

I have the human tabular file from NCBI. ( https://www.ncbi.nlm.nih.gov/genome/browse/#!/proteins/51/1820449%7CHomo%20sapiens/) And for each locus in this file, I want to get the longest ones in R. What path can I follow?

It repeats AGER in the Locus column and when I checked it I need to get it as the longest AGER is in the 16th row

R Programming locus lenght • 756 views
ADD COMMENT
0
Entering edit mode

You want the longest locus relative to what, the gene ID?

ADD REPLY
0
Entering edit mode

ID is unimportant. As length and locus

ADD REPLY
1
Entering edit mode
library("tidyverse")

read_csv("file.csv") |>
  group_by(Locus) |>
  slice_max(Length, n=1) |>
  ungroup()
ADD REPLY

Login before adding your answer.

Traffic: 2262 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6