Skip to content

Commit b5a8f0f

Browse files
authored
Merge pull request #703 from nf-core/dev
2.3.2 patch release
2 parents 29b6e14 + ab63956 commit b5a8f0f

20 files changed

Lines changed: 1350 additions & 789 deletions

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
# Nextflow versions: check pipeline minimum and current latest
23-
nxf_ver: ['20.04.0', '']
23+
nxf_ver: ['20.07.1', '']
2424
steps:
2525
- name: Check out pipeline code
2626
uses: actions/checkout@v2
@@ -34,13 +34,13 @@ jobs:
3434
3535
- name: Build new docker image
3636
if: env.MATCHED_FILES
37-
run: docker build --no-cache . -t nfcore/eager:2.3.1
37+
run: docker build --no-cache . -t nfcore/eager:2.3.2
3838

3939
- name: Pull docker image
4040
if: ${{ !env.MATCHED_FILES }}
4141
run: |
4242
docker pull nfcore/eager:dev
43-
docker tag nfcore/eager:dev nfcore/eager:2.3.1
43+
docker tag nfcore/eager:dev nfcore/eager:2.3.2
4444
4545
- name: Install Nextflow
4646
env:

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,40 @@
33
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## [2.3.2] - 2021-03-16
7+
8+
### `Added`
9+
10+
- [#687](https://github.com/nf-core/eager/pull/687) - Adds Kraken2 unique kmer counting report
11+
- [#676](https://github.com/nf-core/eager/issues/676) - Refactor help message / summary message formatting to automatic versions using nf-core library
12+
- [#682](https://github.com/nf-core/eager/issues/682) - Add AdapterRemoval `--qualitymax` flag to allow FASTQ Phred score range max more than 41
13+
14+
### `Fixed`
15+
16+
- [#666](https://github.com/nf-core/eager/issues/666) - Fixed input file staging for `print_nuclear_contamination`
17+
- [#631](https://github.com/nf-core/eager/issues/631) - Update minimum Nextflow version to 20.07.1, due to unfortunate bug in Nextflow 20.04.1 causing eager to crash if patch pulled
18+
- Made MultiQC crash behaviour stricter when dealing with large datasets, as reported by @ashildv
19+
- [#652](https://github.com/nf-core/eager/issues/652) - Added note to documentation that when using `--skip_collapse` this will use _paired-end_ alignment mode with mappers when using PE data
20+
- [#626](https://github.com/nf-core/eager/issues/626) - Add additional checks to ensure pipeline will give useful error if cells of a TSV column are empty
21+
- Added note to documentation that when using `--skip_collapse` this will use _paired-end_ alignment mode with mappers when using PE data
22+
- [#673](https://github.com/nf-core/eager/pull/673) - Fix Kraken database loading when loading from directory instead of compressed file
23+
- [#688](https://github.com/nf-core/eager/issues/668) - Allow pipeline to complete, even if Qualimap crashes due to an empty or corrupt BAM file for one sample/library
24+
- [#683](https://github.com/nf-core/eager/pull/683) - Sets `--igenomes_ignore` to true by default, as rarely used by users currently and makes resolving configs less complex
25+
- Added exit code `140` to re-tryable exit code list to account for certain scheduler wall-time limit fails
26+
- [#672](https://github.com/nf-core/eager/issues/672) - Removed java parameter from picard tools which could cause memory issues
27+
- [#679](https://github.com/nf-core/eager/issues/679) - Refactor within-process bash conditions to groovy/nextflow, due to incompatibility with some servers environments
28+
- [#690](https://github.com/nf-core/eager/pull/690) - Fixed ANGSD output mode for beagle by setting `-doMajorMinor 1` as default in that case
29+
- [#693](https://github.com/nf-core/eager/issues/693) - Fixed broken TSV input validation for the Colour Chemistry column
30+
- [#695](https://github.com/nf-core/eager/issues/695) - Fixed incorrect `-profile` order in tutorials (originally written reversed due to [nextflow bug](https://github.com/nextflow-io/nextflow/issues/1792))
31+
- [#653](https://github.com/nf-core/eager/issues/653) - Fixed file collision errors with sexdeterrmine for two same-named libraries with different strandedness
32+
33+
### `Dependencies`
34+
35+
- Bumped MultiQC to 1.10 for improved functionality
36+
- Bumped HOPS to 0.35 for MultiQC 1.10 compatibility
37+
38+
### `Deprecated`
39+
640
## [2.3.1] - 2021-01-14
741

842
### `Added`

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ COPY environment.yml /
77
RUN conda env create --quiet -f /environment.yml && conda clean -a
88

99
# Add conda installation dir to PATH (instead of doing 'conda activate')
10-
ENV PATH /opt/conda/envs/nf-core-eager-2.3.1/bin:$PATH
10+
ENV PATH /opt/conda/envs/nf-core-eager-2.3.2/bin:$PATH
1111

1212
# Dump the details of the installed packages to a file for posterity
13-
RUN conda env export --name nf-core-eager-2.3.1 > nf-core-eager-2.3.1.yml
13+
RUN conda env export --name nf-core-eager-2.3.2 > nf-core-eager-2.3.2.yml
1414

1515
# Instruct R processes to use these empty files instead of clashing with a local version
1616
RUN touch .Rprofile

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# ![nf-core/eager](docs/images/nf-core-eager_logo.png)
1+
# ![nf-core/eager](docs/images/nf-core_eager_logo.png)
22

33
**A fully reproducible and state-of-the-art ancient DNA analysis pipeline**.
44

55
[![GitHub Actions CI Status](https://github.com/nf-core/eager/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/eager/actions)
66
[![GitHub Actions Linting Status](https://github.com/nf-core/eager/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/eager/actions)
7-
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.04.0-brightgreen.svg)](https://www.nextflow.io/)
7+
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.07.1-brightgreen.svg)](https://www.nextflow.io/)
88
[![nf-core](https://img.shields.io/badge/nf--core-pipeline-brightgreen.svg)](https://nf-co.re/)
99
[![DOI](https://zenodo.org/badge/135918251.svg)](https://zenodo.org/badge/latestdoi/135918251)
1010

@@ -158,7 +158,10 @@ of this pipeline:
158158

159159
Those who have provided conceptual guidance, suggestions, bug reports etc.
160160

161+
* [Alexandre Gilardet](https://github.com/alexandregilardet)
161162
* Arielle Munters
163+
* [Charles Plessy](https://github.com/charles-plessy)
164+
* [Åshild Vågene](https://github.com/ashildv)
162165
* [Hester van Schalkwyk](https://github.com/hesterjvs)
163166
* [Ido Bar](https://github.com/IdoBar)
164167
* [Irina Velsko](https://github.com/ivelsko)
@@ -184,7 +187,8 @@ For further information or help, don't hesitate to get in touch on the [Slack `#
184187
## Citations
185188
186189
If you use `nf-core/eager` for your analysis, please cite the `eager` preprint as follows:
187-
> James A. Fellows Yates, Thiseas Christos Lamnidis, Maxime Borry, Aida Andrades Valtueña, Zandra Fagneräs, Stephen Clayton, Maxime U. Garcia, Judith Neukamm, Alexander Peltzer **Reproducible, portable, and efficient ancient genome reconstruction with nf-core/eager** bioRxiv 2020.06.11.145615; [doi: https://doi.org/10.1101/2020.06.11.145615](https://doi.org/10.1101/2020.06.11.145615)
190+
191+
> Fellows Yates JA, Lamnidis TC, Borry M, Valtueña Andrades A, Fagernäs Z, Clayton S, Garcia MU, Neukamm J, Peltzer A. 2021. Reproducible, portable, and efficient ancient genome reconstruction with nf-core/eager. PeerJ 9:e10947. DOI: [10.7717/peerj.10947](https://doi.org/10.7717/peerj.10947).
188192
189193
You can cite the eager zenodo record for a specific version using the following [doi: 10.5281/zenodo.3698082](https://zenodo.org/badge/latestdoi/135918251)
190194

bin/kraken_parse.py

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,24 @@ def _get_args():
1919
default=50,
2020
help="Minimum number of hits on clade to report it. Default = 50")
2121
parser.add_argument(
22-
'-o',
23-
dest="output",
22+
'-or',
23+
dest="readout",
2424
default=None,
25-
help="Output file. Default = <basename>.kraken_parsed.csv")
25+
help="Read count output file. Default = <basename>.read_kraken_parsed.csv")
26+
parser.add_argument(
27+
'-ok',
28+
dest="kmerout",
29+
default=None,
30+
help="Kmer Output file. Default = <basename>.kmer_kraken_parsed.csv")
2631

2732
args = parser.parse_args()
2833

2934
infile = args.krakenReport
3035
countlim = int(args.count)
31-
outfile = args.output
36+
readout = args.readout
37+
kmerout = args.kmerout
3238

33-
return(infile, countlim, outfile)
39+
return(infile, countlim, readout, kmerout)
3440

3541

3642
def _get_basename(file_name):
@@ -51,14 +57,23 @@ def parse_kraken(infile, countlim):
5157
5258
'''
5359
with open(infile, 'r') as f:
54-
resdict = {}
60+
read_dict = {}
61+
kmer_dict = {}
5562
csvreader = csv.reader(f, delimiter='\t')
5663
for line in csvreader:
5764
reads = int(line[1])
5865
if reads >= countlim:
59-
taxid = line[4]
60-
resdict[taxid] = reads
61-
return(resdict)
66+
taxid = line[6]
67+
kmer = line[3]
68+
unique_kmer = line[4]
69+
try:
70+
kmer_duplicity = float(kmer)/float(unique_kmer)
71+
except ZeroDivisionError:
72+
kmer_duplicity = 0
73+
read_dict[taxid] = reads
74+
kmer_dict[taxid] = kmer_duplicity
75+
76+
return(read_dict, kmer_dict)
6277

6378

6479
def write_output(resdict, infile, outfile):
@@ -70,10 +85,17 @@ def write_output(resdict, infile, outfile):
7085

7186

7287
if __name__ == '__main__':
73-
INFILE, COUNTLIM, outfile = _get_args()
88+
INFILE, COUNTLIM, readout, kmerout = _get_args()
7489

75-
if not outfile:
76-
outfile = _get_basename(INFILE)+".kraken_parsed.csv"
90+
if not readout:
91+
read_outfile = _get_basename(INFILE)+".read_kraken_parsed.csv"
92+
else:
93+
read_outfile = readout
94+
if not kmerout:
95+
kmer_outfile = _get_basename(INFILE)+".kmer_kraken_parsed.csv"
96+
else:
97+
kmer_outfile = kmerout
7798

78-
tmp_dict = parse_kraken(infile=INFILE, countlim=COUNTLIM)
79-
write_output(resdict=tmp_dict, infile=INFILE, outfile=outfile)
99+
read_dict, kmer_dict = parse_kraken(infile=INFILE, countlim=COUNTLIM)
100+
write_output(resdict=read_dict, infile=INFILE, outfile=read_outfile)
101+
write_output(resdict=kmer_dict, infile=INFILE, outfile=kmer_outfile)

bin/merge_kraken_res.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,29 @@ def _get_args():
1515
formatter_class=argparse.RawDescriptionHelpFormatter,
1616
description='Merging csv count files in one table')
1717
parser.add_argument(
18-
'-o',
19-
dest="output",
20-
default="kraken_count_table.csv",
21-
help="Output file. Default = kraken_count_table.csv")
18+
'-or',
19+
dest="readout",
20+
default="kraken_read_count_table.csv",
21+
help="Read count output file. Default = kraken_read_count_table.csv")
22+
parser.add_argument(
23+
'-ok',
24+
dest="kmerout",
25+
default="kraken_kmer_unicity_table.csv",
26+
help="Kmer unicity output file. Default = kraken_kmer_unicity_table.csv")
2227

2328
args = parser.parse_args()
2429

25-
outfile = args.output
30+
readout = args.readout
31+
kmerout = args.kmerout
2632

27-
return(outfile)
33+
return(readout, kmerout)
2834

2935

3036
def get_csv():
3137
tmp = [i for i in os.listdir() if ".csv" in i]
32-
return(tmp)
38+
kmer = [i for i in tmp if '.kmer_' in i]
39+
read = [i for i in tmp if '.read_' in i]
40+
return(read, kmer)
3341

3442

3543
def _get_basename(file_name):
@@ -54,8 +62,9 @@ def write_csv(pd_dataframe, outfile):
5462

5563

5664
if __name__ == "__main__":
57-
OUTFILE = _get_args()
58-
all_csv = get_csv()
59-
resdf = merge_csv(all_csv)
60-
write_csv(resdf, OUTFILE)
61-
print(resdf)
65+
READOUT, KMEROUT = _get_args()
66+
reads, kmers = get_csv()
67+
read_df = merge_csv(reads)
68+
kmer_df = merge_csv(kmers)
69+
write_csv(read_df, READOUT)
70+
write_csv(kmer_df, KMEROUT)

conf/base.config

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ process {
1414
memory = { check_max( 7.GB * task.attempt, 'memory' ) }
1515
time = { check_max( 24.h * task.attempt, 'time' ) }
1616

17-
errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' }
17+
errorStrategy = { task.exitStatus in [143,137,104,134,139, 140] ? 'retry' : 'finish' }
1818
maxRetries = 3
1919
maxErrors = '-1'
2020

@@ -74,38 +74,34 @@ process {
7474
}
7575

7676
withName:qualimap{
77-
errorStrategy = { task.exitStatus in [1,143,137,104,134,139] ? 'retry' : 'finish' }
77+
errorStrategy = { task.exitStatus in [1,143,137,104,134,139, 140] ? 'retry' : task.exitStatus in [255] ? 'ignore' : 'finish' }
7878
}
7979

8080
withName:preseq {
8181
errorStrategy = 'ignore'
8282
}
8383

8484
withName:damageprofiler {
85-
errorStrategy = { task.exitStatus in [1,143,137,104,134,139] ? 'retry' : 'finish' }
85+
errorStrategy = { task.exitStatus in [1,143,137,104,134,139, 140] ? 'retry' : 'finish' }
8686
}
8787

8888
// Add 1 retry for certain java tools as not enough heap space java errors gives exit code 1
8989
withName: dedup {
90-
errorStrategy = { task.exitStatus in [1,143,137,104,134,139] ? 'retry' : 'finish' }
90+
errorStrategy = { task.exitStatus in [1,143,137,104,134,139, 140] ? 'retry' : 'finish' }
9191
}
9292

9393
withName: markduplicates {
94-
errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'finish' }
94+
errorStrategy = { task.exitStatus in [143,137, 140] ? 'retry' : 'finish' }
9595
}
9696

9797
// Add 1 retry as not enough heapspace java error gives exit code 1
9898
withName: malt {
99-
errorStrategy = { task.exitStatus in [1,143,137,104,134,139] ? 'retry' : 'finish' }
99+
errorStrategy = { task.exitStatus in [1,143,137,104,134,139, 140] ? 'retry' : 'finish' }
100100
}
101101

102102
// other process specific exit statuses
103103
withName: nuclear_contamination {
104-
errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'ignore' : 'retry' }
105-
}
106-
107-
withName: multiqc {
108-
errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'ignore' }
104+
errorStrategy = { task.exitStatus in [143,137,104,134,139, 140] ? 'ignore' : 'retry' }
109105
}
110106

111107
}
-1.13 KB
Loading

docs/images/tutorials/profiles/config_profile_inheritence.svg

Lines changed: 9 additions & 9 deletions
Loading

0 commit comments

Comments
 (0)