Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • komalsrathi
    Member
    • Aug 2013
    • 14

    tophat-fusion-post: ValueError: invalid literal for int() with base 10: 'exonCount'

    Hi everyone,

    I am running tophat-fusion-post like this:

    Code:
    tophat-fusion-post -o ./fusion_results -p 8 --num-fusion-reads 1 --num-fusion-pairs 2 --num-fusion-both 5 /mnt/isilon/cbmi/variome/reference/bowtie_indexes/hg38_no_alt/Homo_sapiens/NCBI/GRCh38/Sequence/BowtieIndex/genome
    My root folder is tophat-fusion. I have 4 tophat output folders under it: CHP212, SHSY5Y, SKNAS and SKNSH, each of which contain a fusions.out file. I have created symbolic links to refGene.txt, ensGene.txt and blast database (blast) in the same folder.

    This is my directory structure where I have run tophat:

    Code:
    $ tree -L 2 ./tophat-fusion
    
    ./
    |-- CHP212
    |   |-- accepted_hits.bam
    |   |-- align_summary.txt
    |   |-- deletions.bed
    |   |-- fusions.out
    |   |-- insertions.bed
    |   |-- junctions.bed
    |   |-- logs
    |   |-- prep_reads.info
    |   `-- unmapped.bam
    |-- CHP212.sh
    |-- CHP212_R1.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/CHP212_R1.fastq.gz
    |-- CHP212_R2.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/CHP212_R2.fastq.gz
    |-- IMR32.sh
    |-- IMR32_R1.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/IMR32_R1.fastq.gz
    |-- IMR32_R2.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/IMR32_R2.fastq.gz
    |-- SHSY5Y
    |   |-- accepted_hits.bam
    |   |-- align_summary.txt
    |   |-- deletions.bed
    |   |-- fusions.out
    |   |-- insertions.bed
    |   |-- junctions.bed
    |   |-- logs
    |   |-- prep_reads.info
    |   `-- unmapped.bam
    |-- SHSY5Y.sh
    |-- SHSY5Y_R1.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/SHSY5Y_R1.fastq.gz
    |-- SHSY5Y_R2.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/SHSY5Y_R2.fastq.gz
    |-- SKNAS
    |   |-- accepted_hits.bam
    |   |-- align_summary.txt
    |   |-- deletions.bed
    |   |-- fusions.out
    |   |-- insertions.bed
    |   |-- junctions.bed
    |   |-- logs
    |   |-- prep_reads.info
    |   `-- unmapped.bam
    |-- SKNAS.sh
    |-- SKNAS_R1.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/SKNAS_R1.fastq.gz
    |-- SKNAS_R2.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/SKNAS_R2.fastq.gz
    |-- SKNSH
    |   |-- accepted_hits.bam
    |   |-- align_summary.txt
    |   |-- deletions.bed
    |   |-- fusions.out
    |   |-- insertions.bed
    |   |-- junctions.bed
    |   |-- logs
    |   |-- prep_reads.info
    |   `-- unmapped.bam
    |-- SKNSH.sh
    |-- SKNSH_R1.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/SKNSH_R1.fastq.gz
    |-- SKNSH_R2.fastq.gz -> /mnt/isilon/maris_lab/target_nbl_ngs/CellLineRNASeq/rawfiles/cat_fastq/SKNSH_R2.fastq.gz
    |-- blast -> /mnt/isilon/cbmi/variome/reference/blast_db/hg38
    |-- ensGene.txt -> /mnt/isilon/cbmi/variome/reference/blast_db/hg38/ensGene.txt
    |-- fusion_results
    |   |-- fusion_seq.bwtout
    |   |-- fusion_seq.fa
    |   |-- fusion_seq.map
    |   |-- logs
    |   `-- tmp
    |-- refGene.txt -> /mnt/isilon/cbmi/variome/reference/blast_db/hg38/refGene.txt
    `-- tophat-fusion.sh
    When I run tophat-fusion-post under this directory, I am getting the following errors:

    Code:
    [Fri Mar 17 15:09:18 2017] Beginning TopHat-Fusion post-processing run (v2.1.0)
    -----------------------------------------------
    [Fri Mar 17 15:09:18 2017] Extracting 23-mer around fusions and mapping them using Bowtie
    [Fri Mar 17 15:09:30 2017] Filtering fusions
    Traceback (most recent call last):
      File "/home/rathik/tools/miniconda3/envs/fusion-env/bin/tophat-fusion-post", line 2924, in <module>
        sys.exit(main())
      File "/home/rathik/tools/miniconda3/envs/fusion-env/bin/tophat-fusion-post", line 2895, in main
        filter_fusion(bwt_idx_prefix, params)
      File "/home/rathik/tools/miniconda3/envs/fusion-env/bin/tophat-fusion-post", line 965, in filter_fusion
        ensGene_list = read_genes("ensGene.txt")
      File "/home/rathik/tools/miniconda3/envs/fusion-env/bin/tophat-fusion-post", line 917, in read_genes
        num_exons = int(line[7])
    ValueError: invalid literal for int() with base 10: 'exonCount'
    Komal Rathi
    Bioinformatics Application Developer
    University of Pennsylvania
  • Enraico
    Junior Member
    • Feb 2012
    • 5

    #2
    remove header line from the ensGene.txt file
    Code:
    mv ensGene.txt ensGene.txt.bk
    grep -v "^#" ensGene.txt.bk > ensGene.txt

    Comment

    • warrenfelsh
      Junior Member
      • Apr 2020
      • 1

      #3
      The error message invalid literal for int() with base 10 would seem to indicate that you are passing a string that's not an integer to the int() function . In other words it's either empty, or has a character in it other than a digit.

      You can solve this error by using Python isdigit() method to check whether the value is number or not. The returns True if all the characters are digits, otherwise False .

      if val.isdigit():

      The other way to overcome this issue is to wrap your code inside a Python try...except block to handle this error.

      Python2.x and Python3.x

      Sometimes the difference between Python2.x and Python3.x that leads to this ValueError: invalid literal for int() with base 10 .

      With Python2.x , int(str(3/2)) gives you "1". With Python3.x , the same gives you ("1.5"): ValueError: invalid literal for int() with base 10: "1.5".

      Comment

      Latest Articles

      Collapse

      • mylaser
        Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by mylaser
        Kheloyar – Everything You Need to Know About Kheloyaar Login and Kheoyar Id
        If you are looking for an online gaming platform that offers a user-friendly experience, Kheloyar has become a name that many users search for. Whether you're interested in creating a new account, accessing your dashboard through Kheloyaar Login, or learning how to obtain a Kheoyar Id, understanding the platform's features and account process is essential.
        This guide explains everything you need to know about...
        Today, 01:13 AM
      • SEQadmin2
        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by SEQadmin2



        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
        ...
        07-09-2026, 11:10 AM
      • SEQadmin2
        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
        by SEQadmin2



        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
        07-08-2026, 05:17 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 07-09-2026, 10:04 AM
      0 responses
      11 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-08-2026, 10:08 AM
      0 responses
      9 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-07-2026, 11:05 AM
      0 responses
      17 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-02-2026, 11:08 AM
      0 responses
      31 views
      0 reactions
      Last Post SEQadmin2  
      Working...