Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • xshang
    replied
    Originally posted by dpryan View Post
    Try
    Code:
    names(human_protein)[1]
    The names() function is an accessor for the names in the AAStringSet object and returns a character vector. Alternatively, you can also use
    Code:
    names(human_protein[1])
    The [ function also returns an AAStringSet, rather than an AAString (returned by [[).
    It works! Many thanks!

    Leave a comment:


  • dpryan
    replied
    Try
    Code:
    names(human_protein)[1]
    The names() function is an accessor for the names in the AAStringSet object and returns a character vector. Alternatively, you can also use
    Code:
    names(human_protein[1])
    The [ function also returns an AAStringSet, rather than an AAString (returned by [[).

    Leave a comment:


  • xshang
    started a topic How can I extract sequence name from fast file in R

    How can I extract sequence name from fast file in R

    Here is my code:
    Code:
    setwd("/Users/xshang/Dropbox/project-ing/peptidome")
    library("Biostrings")
    human_protein <- readAAStringSet("HUMAN.fasta",use.names=TRUE)
    When I use
    Code:
    names(human_protein[[1]])
    , it returns "NULL". How can I extract sequence name from fast file in R?

    Thanks!

Latest Articles

Collapse

  • seqadmin
    Investigating the Gut Microbiome Through Diet and Spatial Biology
    by seqadmin




    The human gut contains trillions of microorganisms that impact digestion, immune functions, and overall health1. Despite major breakthroughs, we’re only beginning to understand the full extent of the microbiome’s influence on health and disease. Advances in next-generation sequencing and spatial biology have opened new windows into this complex environment, yet many questions remain. This article highlights two recent studies exploring how diet influences microbial...
    02-24-2025, 06:31 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, 03-03-2025, 01:15 PM
0 responses
162 views
0 likes
Last Post seqadmin  
Started by seqadmin, 02-28-2025, 12:58 PM
0 responses
248 views
0 likes
Last Post seqadmin  
Started by seqadmin, 02-24-2025, 02:48 PM
0 responses
623 views
0 likes
Last Post seqadmin  
Started by seqadmin, 02-21-2025, 02:46 PM
0 responses
265 views
0 likes
Last Post seqadmin  
Working...
X