Skip to content

Commit

Permalink
Sort items in report
Browse files Browse the repository at this point in the history
  • Loading branch information
cjw85 committed Feb 24, 2021
1 parent 8387904 commit 873a46f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [v0.0.7]
## Changed
- Sample sheet is no longer required.
- Sort report items consistently by sample name.
- Nextclade visual will display overlap to primer scheme selected by user.

## [v0.0.6]
Expand Down
8 changes: 4 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ report_doc = report.HTMLReport(
def read_files(pattern):
dfs = list()
for fname in glob.glob(pattern):
for fname in sorted(glob.glob(pattern)):
dfs.append(pd.read_csv(fname, sep="\\t"))
return pd.concat(dfs)
Expand Down Expand Up @@ -250,7 +250,7 @@ df = read_files("depths_*.txt")
plots_pool = list()
plots_orient = list()
depth_lim = 100
for sample in df['sample_name'].unique():
for sample in sorted(df['sample_name'].unique()):
bc = df['sample_name'] == sample
depth = df[bc].groupby('pos')['depth'].sum()
depth_thresh = 100*(depth >= depth_lim).sum() / len(depth)
Expand Down Expand Up @@ -330,11 +330,11 @@ process allConsensus {
label "artic"
cpus 1
input:
file "sample_*.fastq"
file "*"
output:
file "all_consensus.fasta"
"""
cat sample_*.fastq > all_consensus.fasta
ls *.consensus.fasta | xargs cat > all_consensus.fasta
"""
}

Expand Down

0 comments on commit 873a46f

Please sign in to comment.