-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/icres based grns #22
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
977a855
update gitignore on slurm output files
12c8781
input ACR directory is given as a channel to the gw and lb workflows
5020e69
scripts for run of MINI-AC using iCREs - first commit
216bfdf
Gene sets to run the example test
78b7442
updated gitignore to not upload icres bed fies (too big) and icres ou…
8075032
MINI-AC iCREs config file
5e0c1d4
Making the commented annotations more homogeneous
5310f43
Documentation update for iCREs-based MINI-AC
405b3f1
Ignoring the files within "outputs_icres" but not the folder itself
c0802f0
Keep empty folders with icres and icres outputs
cee26ab
iCREs documentation update
5ec1497
Documentation update
2e11b31
Correction of code annotation
6d49e9e
Update on arguments parsing options
463ec11
Code annotation type
4620bbc
Removal of nargs parameter in arguments parsing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# %% | ||
import argparse | ||
|
||
def parseArgs(): | ||
|
||
parser = argparse.ArgumentParser(prog = 'Script to get a BED file with iCREs ' + \ | ||
'coordinates given a list of genes', | ||
conflict_handler='resolve') | ||
|
||
parser.add_argument('annotated_icres', type = str, | ||
help = '', | ||
metavar = 'BED file with 4th column being ' +\ | ||
'an annotated gene ID') | ||
|
||
parser.add_argument('gene_list', type = str, | ||
help = '', | ||
metavar = 'One column file containing gene IDs '+ \ | ||
'of interest') | ||
|
||
parser.add_argument('bed_of_genes_icres', type = str, | ||
help = '', | ||
metavar = 'Output BED file with coordinates '+\ | ||
'of iCREs associated with genes of interest') | ||
|
||
args = parser.parse_args() | ||
|
||
return args | ||
|
||
args = parseArgs() | ||
|
||
annot_icres = args.annotated_icres | ||
genes_oi_file = args.gene_list | ||
output_file = args.bed_of_genes_icres | ||
|
||
# %% | ||
nicomaper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
genes_oi = set() | ||
|
||
with open(genes_oi_file, "r") as fin: | ||
for line in fin: | ||
rec = line.strip().split("\t") | ||
gene_id = rec[0] | ||
genes_oi.add(gene_id) | ||
|
||
with open(output_file, "w") as fout: | ||
with open(annot_icres, "r") as fin: | ||
for line in fin: | ||
rec = line.strip().split("\t") | ||
gene_id = rec[3] | ||
if gene_id in genes_oi: | ||
fout.write("\t".join(rec[0:3])) | ||
nicomaper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fout.write("\n") |
Empty file.
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.
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.