Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6595385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:56:01+00:00 2026-05-25T17:56:01+00:00

I have a teb-delimited file that has gene names in one column and expression

  • 0

I have a teb-delimited file that has gene names in one column and expression values for these genes in the other. I want to delete certain genes from this file using grep. So, this:

"42261" "SNHG7" "20.2678"
"42262" "SNHG8" "25.3981"
"42263" "SNHG9" "0.488534"
"42264" "SNIP1" "7.35454"
"42265" "SNN"   "2.05365"
"42266" "snoMBII-202"   "0"
"42267" "snoMBII-202"   "0"
"42268" "snoMe28S-Am2634"   "0"
"42269" "snoMe28S-Am2634"   "0"
"42270" "snoR26"    "0"
"42271" "SNORA1"    "0"
"42272" "SNORA1"    "0"

becomes this:

"42261" "SNHG7" "20.2678"
"42262" "SNHG8" "25.3981"
"42263" "SNHG9" "0.488534"
"42264" "SNIP1" "7.35454"
"42265" "SNN"   "2.05365"

I’ve used the following command that i’ve put together with my limited terminal knowledge:

grep -iv sno* <input.text> | grep -iv rp* | grep -iv U6* | grep -iv 7SK* > <output.txt>

So with this command, my output file lacks genes that start with sno, u6 and 7sk but somehow grep has deleted all the genes that has “r” in them instead of the ones that start with “rp”. I’m very confused about this. Any ideas why sno* works but rp* not?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:56:02+00:00Added an answer on May 25, 2026 at 5:56 pm

    The grep command uses regular expressions, not globbing patterns.

    The pattern rp* means “‘r’ followed by zero or more ‘p'”. What you really want is rp.*, or even better, "rp.* (or even just "rp, there’s no point in trying to grep for anything after the “rp” after all). Likewise, sno* means “‘sn’ followed by zero or more ‘o'”. Again, you’d want sno.* or "sno.* (or even just "sno).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a look at one of my websites: moskah.com The problem is that it
Have a really weird one here. The app has two targets, just to be
Have data that has this kind of structure. Will be in ascending order by
Have data that has this kind of structure: $input = [ { animal: 'cat',
Have a simple one-off tasks which needs a progress bar. OpenSSL has a useful
have the following text file: <div> <asp:HyperLinkField HeaderText=Hello World of Regular Expression /> </div>
Have deployed numerous report parts which reference the same view however one of them
Have a bunch of WCF REST services hosted on Azure that access a SQL
have Googled the cr*p out of this one so apologies if the answer is
Have posting working wonderfully, and reading the response happily EXCEPT when one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.