Skip to content

Commit 695c09c

Browse files
authored
Release 2.2.2 (#359)
* 🎨 Add snakefile * 🔥 remove status-sacct.sh * Fix Issue#350 (#353) * Fix pandas version * :up-arrow: Update pandas to 1.5 🎨 Chage line_terminator to lineterminator in `summary.py` * Fix biopython error * Update bioython version * Fix ncbi_is_connected error (#352) * Update metagenome.py * Update metagenome.py * Update version * Remove snakemake workflow * Remove space
1 parent 2b575e7 commit 695c09c

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.1
1+
2.2.2

autometa-env.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ channels:
66
dependencies:
77
- attrs # test-data requirement
88
- bedtools
9-
- biopython
9+
- biopython>=1.82
1010
- bowtie2
1111
- diamond>=2.0
1212
- gdown
1313
- hmmer
1414
- numba>=0.47
1515
- numpy>=1.13
16-
- pandas>=1.1
16+
- pandas>=1.5
1717
- parallel
1818
- pip
1919
- prodigal # NOTE: 2.5 and 2.6 output format is different for sequence headers

autometa/binning/summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def get_metabin_taxonomies(
256256
outcols = [cluster_col, "length", "taxid", *canonical_ranks]
257257
tmp_lines = (
258258
bin_df[outcols]
259-
.to_csv(sep="\t", index=False, header=False, line_terminator="\n")
259+
.to_csv(sep="\t", index=False, header=False, lineterminator="\n")
260260
.split("\n")
261261
)
262262
taxonomies = {}

autometa/common/metagenome.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def length_weighted_gc(self) -> float:
139139
for seq in self.sequences:
140140
weight = len(seq) / self.size
141141
add_weight(weight)
142-
gc_content = SeqUtils.GC(seq)
142+
gc_content = SeqUtils.gc_fraction(seq) * 100
143143
add_gc_contents(gc_content)
144144
return np.average(a=gc_contents, weights=weights)
145145

@@ -312,7 +312,7 @@ def gc_content(self) -> pd.DataFrame:
312312
[
313313
{
314314
"contig": record.id,
315-
"gc_content": SeqUtils.GC(record.seq),
315+
"gc_content": SeqUtils.gc_fraction(record.seq) * 100,
316316
"length": len(record.seq),
317317
}
318318
for record in self.seqrecords

autometa/config/databases.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ def get_remote_checksum(self, section: str, option: str) -> str:
200200
raise ValueError(
201201
f"'section' must be 'ncbi' or 'markers'. Provided: {section}"
202202
)
203-
if not ncbi_is_connected():
204-
raise ConnectionError("Cannot connect to the NCBI rsync server")
203+
print(f"The section is : {section}")
205204
if section == "ncbi":
205+
if not ncbi_is_connected():
206+
raise ConnectionError("Cannot connect to the NCBI rsync server")
206207
host = self.config.get(section, "host")
207208
ftp_fullpath = self.config.get("checksums", option)
208209
chksum_fpath = ftp_fullpath.split(host)[-1]
@@ -604,7 +605,11 @@ def compare_checksums(self, section: str = None) -> Dict[str, Dict]:
604605
# Skip user added options not required by Autometa
605606
continue
606607
# nodes.dmp, names.dmp and merged.dmp are all in taxdump.tar.gz
607-
option = "taxdump" if option in {"nodes", "names", "merged", "delnodes"} else option
608+
option = (
609+
"taxdump"
610+
if option in {"nodes", "names", "merged", "delnodes"}
611+
else option
612+
)
608613
fpath = self.config.get(section, option)
609614
fpath_md5 = f"{fpath}.md5"
610615
# We can not checksum a file that does not exist.

nextflow.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ manifest {
1212
doi = "https://doi.org/10.1093/nar/gkz148"
1313
mainScript = "main.nf"
1414
nextflowVersion = ">=21.04.0"
15-
version = "2.2.1"
15+
version = "2.2.2"
1616
}
1717

1818

tests/unit_tests/test_metagenome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_length_weighted_gc(metagenome):
6969
if metagenome.nseqs == 3:
7070
expected = 65.3167472932504
7171
elif metagenome.nseqs == 4:
72-
expected = 63.195548489666145
72+
expected = 63.19554848966614
7373
else:
7474
expected = None
7575
assert isinstance(metagenome.length_weighted_gc, float)

0 commit comments

Comments
 (0)