TRON-Bioinformatics / seq2HLA

In-silico method written in Python and R to determine HLA genotypes of a sample. seq2HLA takes standard RNA-Seq sequence reads in fastq format as input, uses a bowtie index comprising all HLA alleles and outputs the most likely HLA class I and class II genotypes (in 4 digit resolution), a p-value for each call, and the expression of each class.
MIT License
46 stars 7 forks source link

Error while running seq2HLA #1

Open ChiragNepal opened 5 years ago

ChiragNepal commented 5 years ago

I am running seq2HLA for the first time, the program runs fine up to this stage and throws the error.

The digital haplotype is written into runName-ClassI-class.digitalhaplotype2 2nd iteration done. -----------2 digit typing results-------------

Locus Allele 1 Confidence Allele 2 Confidence

A A68 0 A01 0.01747313 B B51 0.0009102886 B57 0.0002627386 C C15 3.922862e-12 C06 0.01667079 Calculation of locus-specific expression ...

runName-ClassI-class.bowtielog Traceback (most recent call last): File "/NextGenSeqData/project-data/chirag/unixTools/seq2HLA/seq2HLA.py", line 769, in

main(runName,readFile1,readFile2,fastaClassI,fastaClassInonclass,fastaClassII,bowtiebuildClassI,bowtiebuildClassII,bowtiebuildClassInonclass,trim3,threads,class1_list,class1nonclass_list,class2_list,length_dict1,length_dict1nonclass,length_dict2)

File "/NextGenSeqData/project-data/chirag/unixTools/seq2HLA/seq2HLA.py", line 123, in main

mainHLA(runName+"-ClassI-class",readFile1,readFile2,bowtiebuildClassI,fastaClassI,mapopt,trim3,gzipped,class1_list,1,"classical",length_dict1)

File "/NextGenSeqData/project-data/chirag/unixTools/seq2HLA/seq2HLA.py", line 195, in mainHLA expression(locus_list,length_dict,map,runName,readFile1) File "/NextGenSeqData/project-data/chirag/unixTools/seq2HLA/seq2HLA.py", line 623, in expression totalreads=float(linecache.getline(logfile,1).split(':')[1])

ValueError: could not convert string to float: Skipping pair D00620

ramit29 commented 4 years ago

I think I had a similar error when I ran it, it could be because you are running seq2hla on python 2.7 + while the script is written in 2.6.8. You can make the changes to seq2hla.py suggested here to get it running - https://bitbucket.org/sebastian_boegel/seq2hla/pull-requests/2/run-on-posix-like-environments/diff

liaoshengyou commented 3 years ago

totalreads=float(linecache.getline(logfile,1).split(':')[1])

the total reads not exists in logfile line1 , but exists in line2.

use python 2.7+ , the logfile is

Setting the index via positional argument will be deprecated in a future release. Please use -x option instead.

reads processed: 580

    # reads with at least one alignment: 580 (100.00%)
    # reads that failed to align: 0 (0.00%)
    Reported 35847 paired-end alignments
    Now running seq2HLA version 2.3!
    Input is a gipped file .....