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 8290533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:50:31+00:00 2026-06-08T12:50:31+00:00

I have a tab delimited file in which starting from columns 10-25 some of

  • 0

I have a tab delimited file in which starting from columns 10-25 some of the values contain the “.” character. I want to filter out lines which match the “.” character, within this column column range,so that it does not print if it is found less than 8x times in columns 10-25 (i.e. less than 50% occurrence).

I have tried looking at similar posts and the closest I got to is by the user: lodge ( Match lines with pattern n times in the same line ) however, when I tried some of the commands it doesn’t behave in a way that I need to.

For example, the code below replaced everything with a dot…whilst I am aware it is because it is a global substitution, it seemed to work for lodge.

    awk '{ if (gsub(/./, ".") >= 8) print }' merged.vcf > test.vcf 

Here is an example of my file (I only include up to column 11 in this example):

    #CHROM  POS  ID  REF ALT QUAL    FILTER  INFO    FORMAT  AD0062-C AD0065-C
      2L     560 .   T   C   30.65   PASS    AC=3    GT:GQ:PL    .       .
      2L     595 .   G   T   61.75   PASS    AC=11   GT:GQ:PL    .   0/1:13:132,0,10 
  • 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-06-08T12:50:32+00:00Added an answer on June 8, 2026 at 12:50 pm

    If you want to check whether columns 10 – 25 are exactly ., do:

    awk '{c=0; for( i = 10; i <= 25; i++ ) c += $i ~ /^\.$/;
        if( c >= 8 ) print }' input
    

    If you only care that those columns contain a ., omit the ^ and $.

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

Sidebar

Related Questions

I have a tab delimited file that contains date, header row, some values, empty
I have a tab delimited file, for which I need to concatenate selective columns
I have a tab delimited file, in which the first 10 columns are always
I have text file which has tab-delimited columns in following format: fileName Type sc1
I have a tab delimited file which looks like this: CHROM <TAB> POS <TAB>
After spliting a tab delimited file I have my required values in a string
I have a text file with tab delimited data spread across 16 columns. I
I have to parse a tab-delimited text file with Ruby to extract some data
I have a problem using data from a tab delimited data file imported with
I have a large file named CHECKME which is tab delimited. There are 8

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.