BinPro / CONCOCT

Clustering cONtigs with COverage and ComposiTion
Other
119 stars 48 forks source link

The Error: TypeError: expected a string or other character buffer object #275

Open SarahIsme opened 4 years ago

SarahIsme commented 4 years ago

Dear developer,

The concoct was installed by the command "conda install concoct=1.0.0=py27h63c6309_2".

When running the command: concoct_coverage_table.py contigs_10K.bed 114_4_spades_default.bam > coverage_table.csv it showed:

ERROR: fail to open index BAM file '114_4_spades_default.bam'
Traceback (most recent call last):
  File "/home/iwtr/miniconda2/envs/concoct/bin/concoct_coverage_table.py", line 77, in <module>
    generate_input_table(args.bedfile, args.bamfiles, samplenames=samplenames)
  File "/home/iwtr/miniconda2/envs/concoct/bin/concoct_coverage_table.py", line 29, in generate_input_table
    sys.stderr.write(err)
TypeError: expected a string or other character buffer object

The bam file was generated by sorting the sam file using samtools.

Could you please tell how to solve the problem?

Thanks in advance.

jieyalee0226 commented 4 years ago

you must to run "samtools index 114_4_spades_default.bam", and then run "concoct_coverage_table.py contigs_10K.bed 114_4_spades_default.bam > coverage_table.csv".