-1

I have a csv file which I am trying to extract only lines with "Ann_Pet.Fal". This is supposed to be very simple by typing grep -w "Ann_Pet.Fal" my.file. Unfortunately it does not work and I get any line with "Ann_Pet*". I wonder if I should try a different code! Thanks

homolog gene_name   gene    condition   pvalue  Comparison  Test    homology_p  Gene.Model.Name Gene.Model.Description  Gene.Model.Type Primary.Gene.Symbol All.Gene.Symbols
AT1G01040   Ha412HOChr01g0047951    gene4796    longitude_e 2.83E-07    Ann_Pet.Fal Spearman    0   AT1G01040.1 Encodes a Dicer homolog. Dicer is a RNA helicase involved in microRNA processing. Mutations in this locus can result in embryo lethality. Embryo shape at seed maturity is globular-elongate. Other mutants convert the floral meristems to an indeterminate state, others yet show defects in ovule development. mRNA is expressed in all shoot tissues. DCL1 is able to produce miRNAs and siRNAs. The mRNA is cell-to-cell mobile.   protein_coding  DICER-LIKE 1 (DCL1) DICER-LIKE 1 (DCL1);CARPEL FACTORY (CAF);SUSPENSOR 1 (SUS1);SHORT INTEGUMENTS 1 (SIN1);ABNORMAL SUSPENSOR 1 (ASU1);EMBRYO DEFECTIVE 76 (EMB76);EMBRYO DEFECTIVE 60 (EMB60);DICER-LIKE 1 (ATDCL1)
AT1G01040   Ha412HOChr01g0047951    gene4796    longitude_e 4.05E-05    Ann_Pet.Pet Spearman    0   AT1G01040.1 Encodes a Dicer homolog. Dicer is a RNA helicase involved in microRNA processing. Mutations in this locus can result in embryo lethality. Embryo shape at seed maturity is globular-elongate. Other mutants convert the floral meristems to an indeterminate state, others yet show defects in ovule development. mRNA is expressed in all shoot tissues. DCL1 is able to produce miRNAs and siRNAs. The mRNA is cell-to-cell mobile.   protein_coding  DICER-LIKE 1 (DCL1) DICER-LIKE 1 (DCL1);CARPEL FACTORY (CAF);SUSPENSOR 1 (SUS1);SHORT INTEGUMENTS 1 (SIN1);ABNORMAL SUSPENSOR 1 (ASU1);EMBRYO DEFECTIVE 76 (EMB76);EMBRYO DEFECTIVE 60 (EMB60);DICER-LIKE 1 (ATDCL1)
AT1G01140   Ha412HOChr17g0848051    gene84806   CMD_e   9.29E-06    Ann_Pet.Pet Spearman    0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01140   Ha412HOChr17g0848051    gene84806   MAP_e   0.002926603 Ann_Pet.Pet Baypass 0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01140   Ha412HOChr17g0848051    gene84806   longitude_e 1.89E-05    Ann_Pet Baypass 0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01140   Ha412HOChr17g0848051    gene84806   MAP_e   0.002063857 Ann_Pet.Pet Spearman    0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01140   Ha412HOChr17g0848051    gene84806   MSP_e   1.77E-05    Ann_Pet Baypass 0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01140   Ha412HOChr17g0848051    gene84806   longitude_e 1.82E-05    Ann_Pet.Pet Baypass 0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01140   Ha412HOChr17g0848051    gene84806   MSP_e   2.37E-05    Ann_Pet.Pet Baypass 0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01140   Ha412HOChr17g0848051    gene84806   TD_e    0.000193093 Ann_Pet.Pet Spearman    0   AT1G01140.3 Encodes a CBL-interacting protein kinase with similarity to SOS2    protein_coding  CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)    PROTEIN KINASE 6 (PKS6);CBL-INTERACTING PROTEIN KINASE 9 (CIPK9)
AT1G01170   Ha412HOChr10g0446241    gene44625   AHM_e   0.000202829 Ann_Pet Spearman    8.30E-36    AT1G01170.1 ozone-responsive stress-like protein (DUF1138);(source:Araport11)   protein_coding      
  • try with -o, --only-matching in grep. – Pacifist Sep 16 '19 at 0:22
  • No, still does not work :-( – Anna1364 Sep 16 '19 at 0:26
  • Can you paste the content of the file? – Pacifist Sep 16 '19 at 0:26
  • 4
    If you want to match an exact string (rather than a regular expression) then add -F or --fixed-strings to your grep command (so that, for example, . matches literal . rather than any single character). Having said that, based on your example and stated output there is something else going on here that can't be explained by regex matching alone. – steeldriver Sep 16 '19 at 0:41
  • 1
    The command you showed, when run on the file you showed, produces the correct output (in this case, the second line). – G-Man Says 'Reinstate Monica' Sep 16 '19 at 0:43
0

You can try with below mentioned awk command

awk '/Ann_Pet\.Fal/' filename
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.