-
Notifications
You must be signed in to change notification settings - Fork 68
Move to 2.2.0 #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Thibault-Poinsignon
wants to merge
59
commits into
nf-core:dev
Choose a base branch
from
Thibault-Poinsignon:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Move to 2.2.0 #236
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
84fcab9
Update main.nf files paths
Thibault-Poinsignon 45e415f
Update nf-core modules
Thibault-Poinsignon 7bed463
Update subworkflows
Thibault-Poinsignon a6240c7
Update modules
Thibault-Poinsignon d47a02f
Update subworkflows
Thibault-Poinsignon 818cdb8
Write subworkflows meta.yml
Thibault-Poinsignon 649e548
Add module faidx
Thibault-Poinsignon 2482e60
Delete getchromsizes module
Thibault-Poinsignon bee7db7
fix matplotlib config dir error in pairtools
Thibault-Poinsignon bb25849
Fix channel syntax and inputs for cooler cload and samtool sort modules
Thibault-Poinsignon af17a3d
Replace getchromsizes module by faidx module
Thibault-Poinsignon 37016ec
Update utils_nfschema_plugin import and input
Thibault-Poinsignon 30b5b3a
Update markdown settings
Thibault-Poinsignon ad51f7b
Lint template files
Thibault-Poinsignon 3472133
Update nf-core version
Thibault-Poinsignon 821dccd
Fix error in cooler cload ext.args
Thibault-Poinsignon cc2a8cf
Update fastqc for topic channel
Thibault-Poinsignon 3c6806b
Update module multiqc with topic channel
Thibault-Poinsignon 8652332
Update module samtools_sort with topic channel
Thibault-Poinsignon a2e5b48
Fix typo
Thibault-Poinsignon a783902
Update components names in subworkflows meta.yml
Thibault-Poinsignon 77b1f06
Fix --bin_sizes error #62
Thibault-Poinsignon 88b5eb9
Add trimgalore module
Thibault-Poinsignon bdee180
Add clip trimming
Thibault-Poinsignon 59eec1e
Fix cooler add resolution step
Thibault-Poinsignon f1d0993
Add chromosomes size filtering module
Thibault-Poinsignon 1db353a
Fix modules order
Thibault-Poinsignon 01c33ce
Update nfcore modules with topic channels
Thibault-Poinsignon a5c5f64
Remove version channels from subworkflows
Thibault-Poinsignon 0e89b77
Update mem module topic channel
Thibault-Poinsignon 006d5b2
Add min_size params
Thibault-Poinsignon 1c9b500
Fix cload input and output
Thibault-Poinsignon 586fef2
Fix faidx input
Thibault-Poinsignon 6d900d2
Fix resolution not an integer
Thibault-Poinsignon 483ae29
Set default params for arima/arimaV2
Thibault-Poinsignon 88057d8
Update changelog.md
Thibault-Poinsignon 005190e
Update .nf-core.yml
Thibault-Poinsignon 275c466
Run pre-commit
Thibault-Poinsignon 6397ae3
Fix light logo asset
Thibault-Poinsignon f9ecac2
Fix copy paste error in local subworkflows meta.yml
Thibault-Poinsignon f2d4829
Change nf-test profile
Thibault-Poinsignon d159fd1
Merge branch 'dev' into dev
Thibault-Poinsignon cc7815b
Update ro-crate-metadata.json
Thibault-Poinsignon 6f55ebd
Fix logo
Thibault-Poinsignon d08a0fc
Update multiqc
Thibault-Poinsignon e176c00
Update utils_nfschema_plugin
Thibault-Poinsignon 5ded8cb
Remove versions channels
Thibault-Poinsignon 928c484
Update multiqc input structure
Thibault-Poinsignon 15cd6a2
Fix multiqc input channel
Thibault-Poinsignon e0aff04
Update snapshot
Thibault-Poinsignon 871008e
Fix typo
Thibault-Poinsignon 9bcf5a7
Fix logo again
Thibault-Poinsignon bb9d3a1
Update snapshot #2
Thibault-Poinsignon 9c2d857
Update cutsite_trimming to fix generation of empty reads
Thibault-Poinsignon 7699895
Fix lost index id
Thibault-Poinsignon 7a404f3
Set get_valid_interaction to high
Thibault-Poinsignon d359e91
Fix cooler_cload input for multiple samples and resolutions
Thibault-Poinsignon 698f2b0
Fix trimgalore output channel
Thibault-Poinsignon fc488fb
Lint
Thibault-Poinsignon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,4 +10,4 @@ template: | |
| name: hic | ||
| org: nf-core | ||
| outdir: . | ||
| version: 2.2.0dev | ||
| version: 2.2.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| { | ||
| "markdown.styles": ["public/vscode_markdown.css"] | ||
| "markdown.styles": ["public/vscode_markdown.css"], | ||
| "nextflow.telemetry.enabled": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| #!/usr/bin/env python3 | ||
|
|
||
| import argparse | ||
| import gzip | ||
| import ahocorasick | ||
|
|
||
| # Open gzip or regular files transparently | ||
| def opengz(path, mode="rt"): | ||
| return gzip.open(path, mode) if path.endswith(".gz") else open(path, mode) | ||
|
|
||
| # Build Aho-Corasick automaton for fast multi-pattern search | ||
| def build_automaton(sites): | ||
| A = ahocorasick.Automaton() | ||
| for s in sites: | ||
| A.add_word(s, s) | ||
| A.make_automaton() | ||
| return A | ||
|
|
||
| # Find earliest cutsite position in a read | ||
| def cut_position(seq, A): | ||
| pos = None | ||
| for end, site in A.iter(seq): | ||
| start = end - len(site) + 1 | ||
| if pos is None or start < pos: | ||
| pos = start | ||
| return pos | ||
|
|
||
| # Expand cutsite string (e.g., "A^GCTT") into all IUPAC possibilities | ||
| IUPAC = { | ||
| "A": ["A"], | ||
| "T": ["T"], | ||
| "C": ["C"], | ||
| "G": ["G"], | ||
| "N": ["A", "C", "G", "T"], | ||
| } | ||
|
|
||
| def expand_cut_sites(site_string): | ||
| import itertools | ||
| expanded = [] | ||
| for site in site_string.split(","): | ||
| site = site.replace("^", "").upper() | ||
| letters = [IUPAC.get(base, [base]) for base in site] | ||
| for combo in itertools.product(*letters): | ||
| expanded.append("".join(combo)) | ||
| return sorted(set(expanded)) | ||
|
|
||
| def main(): | ||
| p = argparse.ArgumentParser() | ||
| p.add_argument("--fastq", required=True) | ||
| p.add_argument("--cutsite", required=True) | ||
| p.add_argument("--out", required=True) | ||
| p.add_argument("--rmuntrim", action="store_true") | ||
| args = p.parse_args() | ||
|
|
||
| # Expand cutsites and build automaton | ||
| sites = expand_cut_sites(args.cutsite) | ||
| A = build_automaton(sites) | ||
|
|
||
| total = trimmed = dummy = 0 | ||
|
|
||
| with opengz(args.fastq) as fin, open(args.out, "wt") as fout: | ||
| while True: | ||
| ID = fin.readline() | ||
| if not ID: | ||
| break | ||
| seq = fin.readline().rstrip() | ||
| fin.readline() # skip "+" | ||
| qual = fin.readline().rstrip() | ||
|
|
||
| total += 1 | ||
|
|
||
| cut = cut_position(seq, A) | ||
|
|
||
| if cut is not None: | ||
| trimmed += 1 | ||
| if cut == 0: # If cutsite is at position 0, replace with length-1 N read | ||
| dummy += 1 | ||
| fout.write(f"{ID}N\n+\n!\n") | ||
| else: | ||
| fout.write(f"{ID}{seq[:cut]}\n+\n{qual[:cut]}\n") | ||
| elif not args.rmuntrim: | ||
| fout.write(f"{ID}{seq}\n+\n{qual}\n") | ||
|
|
||
| #print(f"Total reads: {total}") | ||
| #print(f"Trimmed reads: {trimmed}") | ||
| #print(f"Dummy reads (site at pos0): {dummy}") | ||
|
|
||
| if __name__ == "__main__": | ||
| main() |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.