Skip to content

Commit

Permalink
dockerfile, ci and v1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
voutcn committed Jul 29, 2019
1 parent 1543f7e commit d3260ad
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
dist: xenial
before_install:
- sudo apt-get update
- sudo apt-get install lcov
- sudo apt-get install -y lcov
language: python
python:
- "2.7"
- "3.4"
script:
- mkdir build
- cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON
- cd build && cmake .. -DCOVERAGE=ON
- make -j2 simple_test
- sudo make install
- megahit --test
- megahit --test --kmin-1pass
- megahit --test --no-hw-accel
after_success:
# Create lcov report
- lcov --capture --directory . --output-file coverage.info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files
- lcov --remove coverage.info '*xxhash/*' --output-file coverage.info # filter xxhash-files
- lcov --remove coverage.info '*parallel_hashmap/*' --output-file coverage.info # filter parallel-hashmap-files
- lcov --remove coverage.info '*pprintpp/*' --output-file coverage.info # filter pprintpp files
- lcov --list coverage.info # debug info
- lcov --capture --directory . --output-file coverage.info.1
- lcov --remove coverage.info.1 '/usr/*' --output-file coverage.info.2 # filter system-files
- lcov --remove coverage.info.2 '*xxhash/*' --output-file coverage.info.3 # filter xxhash-files
- lcov --remove coverage.info.3 '*parallel_hashmap/*' --output-file coverage.info.4 # filter parallel-hashmap-files
- lcov --remove coverage.info.4 '*pprintpp/*' --output-file coverage.info.5 # filter pprintpp files
- lcov --list coverage.info.5 # debug info
# Uploading report to CodeCov
- bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
- bash <(curl -s https://codecov.io/bash) -f coverage.info.5 || echo "Codecov did not collect coverage reports"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.2.7 / 2019-07-28
- Symbol link `megahit_core_no_hw_accel` to `megahit_toolkit` for backward compatibility
- Better logging and for memory adjustment during SDBG building
- Attempt to continue SDBG building even user-specified memory size is not sufficient


### 1.2.6 / 2019-07-13
- Refactored and fixed a bug in local assembler
- Refactored `megahit` script
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ RUN mkdir -p build
WORKDIR build
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
RUN make -j4
RUN make simple_test
RUN make install
RUN megahit --test
RUN megahit --test --kmin-1pass
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@ MEGAHIT is an ultra-fast and memory-efficient NGS assembler. It is optimized for
Installation
---------------

#### Prebuilt binaries for x86_64 Linux
### Conda
```sh
conda install -c bioconda megahit
```

### Pre-built binaries for x86_64 Linux

```sh
wget https://github.com/voutcn/megahit/releases/download/v1.2.6/MEGAHIT-1.2.6-Linux-x86_64-static.tar.gz
tar zvxf MEGAHIT-1.2.6-Linux-x86_64-static.tar.gz
cd MEGAHIT-1.2.6-Linux-x86_64-static/bin/
wget https://github.com/voutcn/megahit/releases/download/v1.2.7/MEGAHIT-1.2.7-Linux-x86_64-static.tar.gz
tar zvxf MEGAHIT-1.2.7-Linux-x86_64-static.tar.gz
cd MEGAHIT-1.2.7-Linux-x86_64-static/bin/
./megahit --test # run on a toy dataset
./megahit -1 MY_PE_READ_1.fq.gz -2 MY_PE_READ_2.fq.gz -o MY_OUTPUT_DIR
```

#### Prebuilt Docker image
### Pre-built docker image
``` sh
# in the directory with your input reads
# in the directory with the input reads
docker run -v $(pwd):/workspace -w /workspace --user $(id -u):$(id -g) vout/megahit \
megahit -1 MY_PE_READ_1.fq.gz -2 MY_PE_READ_2.fq.gz -o MY_OUTPUT_DIR
```

#### Building from source
### Building from source

##### Prerequisites
#### Prerequisites

- For building: zlib, cmake &gt;= 2.8, g++ &gt;= 4.8.4
- For running: gzip and bzip2
Expand All @@ -37,7 +42,7 @@ git clone https://github.com/voutcn/megahit.git
cd megahit
git submodule update --init
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release # add -DCMAKE_INSTALL_PREFIX=YOUR_PREFIX if needed
cmake .. -DCMAKE_BUILD_TYPE=Release # add -DCMAKE_INSTALL_PREFIX=MY_PREFIX if needed
make -j4
make simple_test # will test MEGAHIT with a toy dataset
# make install if needed
Expand All @@ -46,7 +51,7 @@ make simple_test # will test MEGAHIT with a toy dataset
Usage
-----

#### Basic usage
### Basic usage
```sh
megahit -1 pe_1.fq -2 pe_2.fq -o out # 1 paired-end library
megahit --12 interleaved.fq -o out # one paired & interleaved paired-end library
Expand All @@ -55,7 +60,7 @@ megahit_core contig2fastg 119 out/intermediate_contigs/k119.contig.fa > k119.fas
```
The contigs can be found `final.contigs.fa` in the output directory.

#### Advanced usage
### Advanced usage
- `--kmin-1pass`: if sequencing depth is low and too much memory used when build the graph of k_min
- `--presets meta-large`: if the metagenome is complex (i.e., bio-diversity is high, for example soil metagenomes)
- `--cleaning-rounds 1 --disconnect-ratio 0`: get less pruned assembly (usually shorter contigs)
Expand All @@ -74,4 +79,4 @@ Publications
License
-------

This project is licensed under the GPLv3 License - see the [LICENSE](LICENSE) file for details
This project is licensed under the GPLv3 License - see the [LICENSE](LICENSE) file for details

0 comments on commit d3260ad

Please sign in to comment.