Fatal error in TAPIS

Issue #5 new
XIAOYUZHAN created an issue

Hello,

When running alignPacBio.py as tutorial recommended, there are some fatal error. And I listed them as follows.

Traceback (most recent call last): File "./software/python2/bin/cleanAlignments.py", line 81, in <module> bamfile = pysam.Samfile(args.bam_input , 'rb' ) File "pysam/libcalignmentfile.pyx", line 444, in ysam.libcalignmentfile.AlignmentFile.cinit File "pysam/libcalignmentfile.pyx", line 664, in pysam.libcalignmentfile.AlignmentFile._open ValueError: file has no sequences defined (mode='rb') - is it SAM/BAM format? Consider opening with check_sq=False Traceback (most recent call last): File "./software/python2/bin/alignPacBio.py", line 75, in <module> if os.path.getsize(gmapIn) == 0: File "./software/python2/lib/python2.7/genericpath.py", line 57, in getsize return os.stat(filename).st_size OSError: [Errno 2] No such file or directory: './temp_dir/Homo_sapiens-GM12878_fixed_r1.fa'

Besides, I wonder can fastq file can be the input of alignPacBio.py or only fasta file can be accepted.

I appreciate any reply for this message

Comments (1)

  1. Yibo Wu

    Hi Xiaoyu Zhan,

    I met this problem too, this problem is caused by some commands in the convertSam.py file, please try:

    line 43: sorted_basename = "%s.sorted" %(bamfile.split(".bam")[0])

    change to: sorted_basename = "%s.sorted.bam" %(bamfile.split(".bam")[0])

    line 44: cmd = "samtools sort -@ %d -m %dG %s %s" %(processors, memory, bamfile, sorted_basename)

    change to: cmd = "samtools sort -@ %d -m %dG %s > %s" %(processors, memory, bamfile, sorted_basename)

    line 48: cmd = 'mv %s.bam %s' % ( sorted_basename, bamfile )

    change to: cmd = 'mv %s %s' % ( sorted_basename, bamfile )

    I think this would work.

    Good luck!

    Yibo

  2. Log in to comment