Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anil K
    Junior Member
    • Apr 2015
    • 2

    #1

    Converting tab-delimited text file into HTML/PDF/latex/knitr report.

    I have a bash script that takes ABI file as input and uses ANNOVAR for annotating the variants. A tab-delimited text file is produced that contains the annotated variants. So everytime the bash script is executed for different ABI files, the number of columns are fixed in the tab-delimited file but the number of rows as well as the individual annotations may vary for each resulting variant.

    Please see "Annovar_Result.txt" for ANNOVAR's tab-delimited file.

    Attempts so far-->

    I have tried to write a bash script that extracts [for the first variant] different fields from the tab-delimited text file, saves it as text file, combines all the resulting text individual files and using AWK script it assigns different variables to each of the fields in the Combined Text File. I have created HTML page using AWK and have used these variables in AWK script to print in respective tags in HTML and it works fine for a file that follows the same pattern in tab-delimited text file. But when a particular field is not present for other annotated results with different pattern, the script prints different fields than the variable it has been assigned for.

    So in the above example, the first variant contains the Clinically significant mutation since there is annotation present in the "clinvar" column and thus it needs to be reported in a different section along with other details.

    Please see "combined_fields.png " for the combined text file.

    The order of the combined text file is not the same for each variant, hence the report generated for it is not correct.

    Expected Result-->

    Since the format of the tab-delimited file is not uniform, is there any way that for each row I can set multiple conditions wherein for example If a specific column [for ex:clinvar] has a value, then print it in between HTML tags and if it is not present, then check for another column [for ex: rsID] and if a value is present then print it in some other HTML tags, and so on for other columns as well!

    Please see "expected_result.png " for the expected output.

    In a similar manner, when there is a novel variant wherein the ExonicFunc.refGene column contains "non-synonymous" and there is no value in the snp138 column, then it should print the SIFT_score along with other details in between HTML tags. These are just some of the conditions that are needed, but if anyone can give an idea as to how to go about all this, it will be really helpful!!!

    Thank you for reading such a long issue and any help on this problem would be greatly appreciated.
    Attached Files
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Cross-posted on Biostars: https://www.biostars.org/p/147283/

    Since this is not strictly an bioinformatics issue (but a formatting one) you may want to post it on another site such as stackexchange.

    Comment

    • Anil K
      Junior Member
      • Apr 2015
      • 2

      #3
      Well, I am not able to delete posts either here or in biostar!

      Comment

      Latest Articles

      Collapse

      • SEQadmin2
        Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
        by SEQadmin2



        CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

        Despite this, “CRISPR helped turn genome editing from a specialized technique into
        ...
        07-31-2026, 11:01 AM
      • SEQadmin2
        Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
        by SEQadmin2


        Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

        The systematic characterization of the human proteome has
        ...
        07-20-2026, 11:48 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 08-13-2026, 12:22 PM
      0 responses
      20 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-11-2026, 10:35 AM
      0 responses
      17 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-06-2026, 07:41 AM
      0 responses
      32 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-03-2026, 10:13 AM
      0 responses
      50 views
      0 reactions
      Last Post SEQadmin2  
      Working...