This is a test version of Biostars. For the public version, visit https://www.biostars.org.
retrieve with tabix only fields of interest

I am using tabix to retrieve information in a specific genomic region. need not the hole information but only let say second and the third column.

My file is constructed as follows:

##INFO=<ID=GENE,Description="Neighbouring Gene">
##INFO=<ID=A1,Description="Allele 1 (+)">
#SNPID  CHROM   POS     GENE    A1      A2      STUDIES CASES   CONTROLS

So, ideally I would like to have only SNPID, CHROM, POS, CASES.

Is there any possibility to retrieve only this information?

snp

1 answer

tabix file.tsv.gz chr12:345-678 | grep -v "##" | cut -f 1,2,3,7

Log in to answer this question.