Giter Site home page Giter Site logo

metamic's Introduction

metaMIC: Reference-free Misassembly Identification and Correction of metagenomic assemblies

metaMIC is a fully automated tool for identifying and correcting misassemblies of (meta)genomic assemblies with the following three steps. Firstly, metaMIC extracts various types of features from the alignment between paired-end sequencing reads and the assembled contigs. Secondly, the features extracted in the first step will be used as input of a random forest classifier for identifying misassembled metagenomic assemblies. Thirdly, metaMIC will localize misassembly breakpoints for each misassembled contig and then correct misassemblies by splitting into parts at the breakpoints.

Requirements and Installation

Make sure you have the dependencies below installed and accessible in your $PATH.

Prepare dependencies

  1. install python modules: pandas, numpy, pysam
conda install -c bioconda pandas numpy pysam biopython  

or

pip install pysam pandas numpy biopython
  1. download and install samtools, bwa, jellyfish
conda install -c bioconda samtools bwa jellyfish  

or

wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2
tar -jxvf samtools-1.9.tar.bz2
cd samtools-1.9
./configure
make
make install
export PATH=`pwd`:$PATH
wget https://sourceforge.net/projects/bio-bwa/files/latest/download/bwa-0.7.17.tar.bz2
tar -jxvf bwa-0.7.17.tar.bz2
cd bwa-0.7.17
make
export PATH=`pwd`:$PATH
wget http://www.cbcb.umd.edu/software/jellyfish/jellyfish-1.1.10.tar.gz
tar zxvf jellyfish-1.1.10.tar.gz
cd jellyfish-1.1.10
./configure
make
make install
export PATH=`pwd`/bin:$PATH

Installation

Install metaMIC via git
git clone https://github.com/ZhaoXM-Lab/metaMIC.git
cd metaMIC
python setup.py install
metaMIC -h

# downloading models
metaMIC download_model

Quick Start

  • First map paired-end reads to assembled contigs
bwa index $contig_file
bwa mem -a -t 8 $contig_file $read1 $read2 | samtools view -h -q 10 -m 50 -F 4 -b | samtools sort > $bam_file
  • generate pileup file
samtools mpileup -C 50 -A -f $contig_file $bam_file |  awk '$3 != "N"' > $pileup_file
  • run metaMIC

For metagenomics

# Step 1: extract features [output file: feature_matrix/window_fea_matrix.txt,feature_matrix/contig_fea_matrix.txt]

metaMIC extract_feature --bam $bam_file -c $contig_file -o $output_dir --pileup $pileup_file -m meta

# Step 2: misassembly breakpoint identification and correction;
# output directory must be same as the above $output_dir
# [output file: metaMIC_corrected_contigs.fa, misassembly_breakpoint.txt, anomaly_score.txt]

metaMIC predict -c $contig_file -o $output_dir -a MEGAHIT -m meta

For isolate genomes

# Step 1: extract features [output file: feature_matrix/window_fea_matrix.txt]

metaMIC extract_feature --bam $bam_file -c $contig_file -o $output_dir --pileup $pileup_file -m single

# Step 2: misassembly breakpoint identification and correction;
# output directory must be same as the above $output_dir
# [output file: metaMIC_corrected_contigs.fa, misassembly_breakpoint.txt, anomaly_score.txt]

metaMIC predict -c $contig_file -o $output_dir -m single

Training on new datasets

If you want to generate a new training model on a novel dataset. Contig labels and name of new training models should be provided. The Step 1 is the same as above, then the contig_fea_matrix.txt will be used as the training datasets.

# Step 1: extract features [output file: feature_matrix/window_fea_matrix.txt,feature_matrix/contig_fea_matrix.txt]

metaMIC extract_feature --bam $bam_file -c $contig_file -o $output_dir --pileup $pileup_file -m meta

# Step 2: Generating new training models
# output directory must be same as the above $output_dir
# format of contig_label file should be:
# contig1\t0
# contig2\t1
# contig3\t0
# ...
# contig100\t0

metaMIC train -o $output_dir -a $New_model_name --label $contig_label 

For more details about the usage of metaMIC, read the docs

Example

example data
  • R.sphaeroides_pileup.out
  • R.sphaeroides.bam
  • velvet_ctg.fasta
cd example
sh download.sh
metaMIC extract_feature --pileup R.sphaeroides_pileup.out --bam R.sphaeroides.bam -c velvet_ctg.fasta -m single -o test
metaMIC predict -c velvet_ctg.fasta -o test -m single

Output

The output folder will contain

  1. Misassembly score for each contig: metaMIC_contig_score.txt (for only metagenomics)
  2. predicted misassembly breakpoints for misassembled contigs: misassembly_breakpoint.txt
  3. Anomaly scores for each position in contigs: anomaly_score.txt
  4. Fasta file of corrected contigs: metaMIC_corrected_contigs.fa
  5. Some intermediate files

For more details about the output, read the docs

Complete option list

metaMIC:

usage: metaMIC [-h]  ...

Reference-free Misassembly Identification and Correction of metagenomic
assemblies

optional arguments:
  -h, --help       show this help message and exit

metaMIC subcommands:

    extract_feature
                   Extract features from inputs.
    predict        Predict.
    train          Train model.
    

usage: metaMIC extract_feature [-h] [-t THREADS] [--bam BAMFILE] [--r1 READ1]
                               [--r2 READ2] [-p READ] -c ASSEMBLIES -o OUTPUT
                               --pileup PILEUP -m MODE [-l MIN_LENGTH]
                               [--samtools SAMTOOLS] [--jellyfish JELLYFISH]

optional arguments:
  -h, --help            show this help message and exit
  -t THREADS, --threads THREADS
                        Maximum number of threads [default: 8]
  --bam BAMFILE         index bam file for alignment
  --r1 READ1            read1
  --r2 READ2            read2
  -p READ, --r READ     smart pairing (ignoring #2 fasta/q)
  -c ASSEMBLIES, --contig ASSEMBLIES
                        fasta file of assembled contigs
  -o OUTPUT, --output OUTPUT
                        output directory for metaMIC results
  --pileup PILEUP       path to pileup file [samtools mpileup]
  -m MODE, --mode MODE  Applied to single genomic/metagenomic assemblies
                        [meta/single]
  -l MIN_LENGTH, --mlen MIN_LENGTH
                        Minimum contig length [default: 5000bp]
  --samtools SAMTOOLS   path to samtools
  --jellyfish JELLYFISH
                        path to jellyfish
                        
usage: metaMIC predict [-h] -o OUTPUT -m MODE -c ASSEMBLIES [-a ASSEMBLER]
                       [-l MIN_LENGTH] [-s SPLIT_LENGTH] [--nb BREAK_COUNT]
                       [--rb BREAK_RATIO] [--at ANOMALY_THRED]

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output directory for metaMIC results
  -m MODE, --mode MODE  Applied to single genomic/metagenomic assemblies
                        [meta/single]
  -c ASSEMBLIES, --contig ASSEMBLIES
                        fasta file of assembled contigs
  -a ASSEMBLER, --assembler ASSEMBLER
                        The assembler-specific model or user-trained model
                        used for assembled fasta file [MEGAHIT/IDBA_UD/metaSPAdes/[new
                        training model specified by users]]
  -l MIN_LENGTH, --mlen MIN_LENGTH
                        Minimum contig length [default: 5000bp]
  -s SPLIT_LENGTH, --slen SPLIT_LENGTH
                        Minimum length of split fragments [default: 1000bp]
  --nb BREAK_COUNT      Threshold of read breakpoint counts for correcting
                        misassemblies 
  --rb BREAK_RATIO      Threshold of read breakpoint ratio for correcting
                        misassemblies 
  --at ANOMALY_THRED    Threshold of anomaly score for correcting
                        misassemblies 
  --st SCORE_THRED      Threshold of contig score for correcting misassemblies                        
                        
usage: metaMIC train [-h] -o OUTPUT [--label LABEL] [-a ASSEMBLER]
                     [-t THREADS]

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output directory for metaMIC results
  --label LABEL         Misassembly label of contigs for training assemblies
  -a ASSEMBLER, --assembler ASSEMBLER
                        The name of the directory of the trained model.
  -t THREADS, --threads THREADS
                        Maximum number of CPUs [default: 8]                        

metamic's People

Contributors

seny-l avatar psj1997 avatar zhaoxm-lab avatar qxibai avatar

Stargazers

 avatar Falk Hildebrand avatar Zhang Yixing avatar Tianyu ZHAO avatar Roland avatar Emmett Peng avatar Lawrence Gordon avatar sucheta avatar  avatar Derek Smith avatar Shuai WANG  avatar Csbio_yzu avatar Cpop avatar  avatar  avatar Mario Moreno avatar Bob Leung avatar  avatar zm avatar Wei Shen avatar  avatar Oskar Hickl avatar Anders Kiledal avatar Jinlong Ru avatar Kohei Ito avatar dongxy23 avatar Brandon Pickett avatar

metamic's Issues

jellyfish command hardcoded to 8 threads

In extract.py:

def KAD(args, contig, file):
    if os.path.exists(os.path.join(args.output, "temp/KAD/KAD_data/",
                                   str(contig), ".KAD")):
        return 0
    contig_file = os.path.join(args.output, "temp/split/contigs/", "{}.fa".format(file))

    read_file = os.path.join(args.output,
                             "temp/split/reads/{}.read.fa".format(str(contig)))
    # kmer count
    outputdir = os.path.join(args.output, "temp/KAD/temp")
    contig_command1 = ' '.join([args.jellyfish,
                                "count -m 25 -o",
                                os.path.join(outputdir, '{}.jf'.format(str(contig))),
                                "-s 100M -t 8",
                                contig_file])

The use of -t 8 plus pool.apply_async(func=KAD, args=(args, contig, file,)) in KAD_cal() seems to use way more processes than specified by the user.

IndexError: cannot do a non-empty take from an empty axes.

$ metaMIC extract_feature --bam K1_ASM_aln_sorted_dedup.bam --r1 ../upstream_sequence/correct_K1_R1.fq.gz --r2 ../upstream_sequence/correct_K1_R2.fq.gz -c K1_ASM.fasta -o K1_ASM_metamic --pileup  -m meta -l 1000
2024-01-13 13:11:27,109 - Start metaMIC
2024-01-13 13:11:48,516 - Step: Feature extraction
feature files exist and will not re-extract features
Traceback (most recent call last):
  File "/home/ddalab/anaconda3/envs/metaMIC/bin/metaMIC", line 33, in <module>
    sys.exit(load_entry_point('metaMIC==0.0.0', 'console_scripts', 'metaMIC')())
  File "/home/ddalab/anaconda3/envs/metaMIC/lib/python3.8/site-packages/metaMIC-0.0.0-py3.8.egg/metaMIC/metaMIC.py", line 905, in main
    extract_feature(options)
  File "/home/ddalab/anaconda3/envs/metaMIC/lib/python3.8/site-packages/metaMIC-0.0.0-py3.8.egg/metaMIC/metaMIC.py", line 438, in extract_feature
    window_matrix, contig_matrix = cal_feature(options)
  File "/home/ddalab/anaconda3/envs/metaMIC/lib/python3.8/site-packages/metaMIC-0.0.0-py3.8.egg/metaMIC/metaMIC.py", line 547, in cal_feature
    contig_data = contig_fea_generate(window_data)
  File "/home/ddalab/anaconda3/envs/metaMIC/lib/python3.8/site-packages/metaMIC-0.0.0-py3.8.egg/metaMIC/metaMIC.py", line 461, in contig_fea_generate
    data['coverage_status'] = (data['normalized_coverage'] > cov_thread_cal(list(data['normalized_coverage']))[0]) + \
  File "/home/ddalab/anaconda3/envs/metaMIC/lib/python3.8/site-packages/metaMIC-0.0.0-py3.8.egg/metaMIC/metaMIC.py", line 442, in cov_thread_cal
    up = np.percentile(np.array(data), 95)
  File "<__array_function__ internals>", line 200, in percentile
  File "/home/ddalab/.local/lib/python3.8/site-packages/numpy/lib/function_base.py", line 4205, in percentile
    return _quantile_unchecked(
  File "/home/ddalab/.local/lib/python3.8/site-packages/numpy/lib/function_base.py", line 4473, in _quantile_unchecked
    return _ureduce(a,
  File "/home/ddalab/.local/lib/python3.8/site-packages/numpy/lib/function_base.py", line 3752, in _ureduce
    r = func(a, **kwargs)
  File "/home/ddalab/.local/lib/python3.8/site-packages/numpy/lib/function_base.py", line 4639, in _quantile_ureduce_func
    result = _quantile(arr,
  File "/home/ddalab/.local/lib/python3.8/site-packages/numpy/lib/function_base.py", line 4745, in _quantile
    take(arr, indices=-1, axis=DATA_AXIS)
  File "<__array_function__ internals>", line 200, in take
  File "/home/ddalab/.local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 190, in take
    return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
  File "/home/ddalab/.local/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
    return bound(*args, **kwds)
IndexError: cannot do a non-empty take from an empty axes.

Screenshot_bam_file
Screenshot_pileup_file

Output fasta file question

The number of contig in my output file metaMIC_corrected_contigs.fa is significantly fewer than the number of contig in my input fasta file. I wonder if it only contains contigs which were corrected and ignores contigs which passed the test? And how can I get a single fasta file contains all the contig (corrected contigs and contigs passed the test) without duplication?

download_model: Error: cannot unzip the file.

The download_model() function does not check whether the uncompressed model directory already exists (e.g., from a half-finished/aborted previous download/uncompress). If the output directory already exists, then the uncompression of the downloaded *.tar.gz will fail and cause the whole job to fail with the following error:

2021-07-22 14:00:35,403 - Start metaMIC
Downloading model for MEGAHIT
Download finished. Checking MD5...
Error: cannot unzip the file.

运行错误

您好,我想问一下。
我又一个运行错误,希望您能解答以下。
您给的处理原始数据,产生bam文件的代码是这个。
bwa index $contig_file
bwa mem -a -t 8 $contig_file $read1 $read2 | samtools view -h -q 10 -m 50 -F 4 -b | samtools sort > $bam_file
但是我运行了这段代码,并且产生pileup文件后,运行这段代码时,却发现抱错,显示我没有contig_fea_matrix.txt文件。
Step 1: extract features [output file: feature_matrix/window_fea_matrix.txt,feature_matrix/contig_fea_matrix.txt]
metaMIC extract_feature --bam $bam_file -c $contig_file -o $output_dir --pileup $pileup_file -m meta
在我怀疑我的源文件错误之后,我运行了文件中自带的example文件,发现自带的example文件中的bam文件与我用bwa获得的bam文件大小不一致,用您提供的bam文件可以很好的运行,但是用bwa获得的bam文件却总是报错,我想问一下,这种问题该怎么解决?
image

malloc error in first step

Hello,

I am a master's student working on generating some MAGs for my project, so I'm using metaMIC for assembly quality control before moving onto binning. When running the mapping step, I'm running into the following malloc errors:

bwa(75953,0x700005c90000) malloc: *** error for object 0x60002d897ff0: pointer being freed was not allocated
bwa(75953,0x700005c90000) malloc: *** set a breakpoint in malloc_error_break to debug

Here's the input code that I used:
bwa mem -a -t 8 /Volumes/T7/revisedIC12/assembled/revisedIC12.fasta /Volumes/T7/revisedIC12/trimmomatic/IC12output_1P.fastq /Volumes/T7/revisedIC12/trimmomatic/IC12output_2P.fastq| samtools view -h -q 10 -m 50 -F 4 -b | samtools sort >/Volumes/T7/revisedIC12/sorted/metamicbam.bam

I'm using an iMac macOS Ventura 13.4.1, 64 GB of memory.
I used the conda install and did have some problems downloading the models, so I had to use pip to install job lib, scikit-learn, and requests in order to get the mapping step to run in general.

If there's any advice on how to fix the malloc error, please let me know! I did run first aid in disk utilities prior to trying the mapping step a second time.

Thank you!

ModuleNotFoundError: No module named 'joblib'

Hello
I'm looking forward to cleaning up some messy assemblies! First though, I think I am having some kind of install issue. I have followed the instructions for conda install from the git hub, and it all seems to work until the last steps:

(metaMIC_env) metaMIC -h
Traceback (most recent call last):
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/bin/metaMIC", line 33, in <module>
    sys.exit(load_entry_point('metaMIC==0.0.0', 'console_scripts', 'metaMIC')())
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 486, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2867, in load_entry_point
    return ep.load()
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2471, in load
    return self.resolve()
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2477, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/metaMIC-0.0.0-py3.7.egg/metaMIC/metaMIC.py", line 20, in <module>
    import joblib
ModuleNotFoundError: No module named 'joblib'
(metaMIC_env) metaMIC download_model
Traceback (most recent call last):
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/bin/metaMIC", line 33, in <module>
    sys.exit(load_entry_point('metaMIC==0.0.0', 'console_scripts', 'metaMIC')())
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 486, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2867, in load_entry_point
    return ep.load()
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2471, in load
    return self.resolve()
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2477, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/users/PAS1212/lauramason326/miniconda3/envs/metaMIC_env/lib/python3.7/site-packages/metaMIC-0.0.0-py3.7.egg/metaMIC/metaMIC.py", line 20, in <module>
    import joblib
ModuleNotFoundError: No module named 'joblib'

Any suggetsions?
Thanks in advance
Laura

IndexError: index -1 is out of bounds for axis 0 with size 0

$metaMIC extract_feature -t 70 --bam K1_ASM.bam.gz --r1 K1_repair_R1.fq.gz --r2 K1_repair_R2.fq.gz -c K1_ASM.fasta -o output_dir --pileup K1_ASM_pileup.out -m meta -l 1500

2024-01-24 17:32:13,422 - Start metaMIC
2024-01-24 17:32:31,339 - Step: Feature extraction
Traceback (most recent call last):
  File "/home/ddalab/mambaforge/envs/metaMIC/bin/metaMIC", line 33, in <module>
    sys.exit(load_entry_point('metaMIC', 'console_scripts', 'metaMIC')())
  File "/home/ddalab/metaMIC/metaMIC/metaMIC.py", line 904, in main
    extract_feature(options)
  File "/home/ddalab/metaMIC/metaMIC/metaMIC.py", line 437, in extract_feature
    window_matrix, contig_matrix = cal_feature(options)
  File "/home/ddalab/metaMIC/metaMIC/metaMIC.py", line 546, in cal_feature
    contig_data = contig_fea_generate(window_data)
  File "/home/ddalab/metaMIC/metaMIC/metaMIC.py", line 460, in contig_fea_generate
    data['coverage_status'] = (data['normalized_coverage'] > cov_thread_cal(list(data['normalized_coverage']))[0]) + \
  File "/home/ddalab/metaMIC/metaMIC/metaMIC.py", line 441, in cov_thread_cal
    up = np.percentile(np.array(data), 95)
  File "/home/ddalab/mambaforge/envs/metaMIC/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4283, in percentile
    return _quantile_unchecked(
  File "/home/ddalab/mambaforge/envs/metaMIC/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4555, in _quantile_unchecked
    return _ureduce(a,
  File "/home/ddalab/mambaforge/envs/metaMIC/lib/python3.9/site-packages/numpy/lib/function_base.py", line 3823, in _ureduce
    r = func(a, **kwargs)
  File "/home/ddalab/mambaforge/envs/metaMIC/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4721, in _quantile_ureduce_func
    result = _quantile(arr,
  File "/home/ddalab/mambaforge/envs/metaMIC/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4830, in _quantile
    slices_having_nans = np.isnan(arr[-1, ...])
IndexError: index -1 is out of bounds for axis 0 with size 0

extract_feature: numpy.core._exceptions._UFuncNoLoopError

I'm running the following on my dataset:

metaMIC extract_feature --mlen 5000 -t 8 -m meta   --pileup pileup.txt --bam metaspades.bam           --contig contigs_filtered.fasta --output test
2021-07-12 14:21:28,537 - Start metaMIC
2021-07-12 14:21:29,957 - Step: Feature extraction
Process Process-4:
Traceback (most recent call last):
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/site-packages/metaMIC/extract.py", line 437, in read_breakpoint_cal
    window_read_breakpoint_data = window_break_cal(read_breakpoint_data)
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/site-packages/metaMIC/extract.py", line 389, in window_break_cal
    data['index'] = data['contig'] + '_' + \
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/site-packages/pandas/core/ops/common.py", line 69, in new_method
    return method(self, other)
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/site-packages/pandas/core/arraylike.py", line 92, in __add__
    return self._arith_method(other, operator.add)
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/site-packages/pandas/core/series.py", line 5525, in _arith_method
    result = ops.arithmetic_op(lvalues, rvalues, op)
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/site-packages/pandas/core/ops/array_ops.py", line 224, in arithmetic_op
    res_values = _na_arithmetic_op(left, right, op)
  File "/ebio/abt3_projects/test/.snakemake/conda/efef0c0639418737003b248bfdc4e478/lib/python3.9/site-packages/pandas/core/ops/array_ops.py", line 166, in _na_arithmetic_op
    result = func(left, right)
numpy.core._exceptions._UFuncNoLoopError: ufunc 'add' did not contain a loop with signature matching types (dtype('float64'), dtype('<U1')) -> None
    data['index'] = data['contig'] + '_' + \
        [str(int(x)) for x in data['start_pos']]

It appears that [str(int(x)) for x in data['start_pos']] did not have the correct object type for the string concatenation, seemingly due to a None value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.