Skip to content

Commit 7ab48ca

Browse files
authored
Merge pull request #32 from gogetdata/cli_update
Cli update
2 parents e512b5e + 9a60b61 commit 7ab48ca

File tree

4 files changed

+35
-33
lines changed

4 files changed

+35
-33
lines changed

ggd/check_recipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,10 @@ def check_files(
889889
":ggd:check-recipe: !!ERROR!!: with: %s(%s) must be sorted, bgzipped AND tabixed.\n"
890890
% (P, n)
891891
)
892-
elif n.endswith((".fasta", ".fa", ".fasta.gz", ".fa.gz")):
892+
elif n.endswith((".fasta", ".fa", ".fasta.gz", ".fa.gz", ".fastq", ".fq", ".fastq.gz", ".fq.gz")):
893893
if (
894894
not op.basename(n + ".fai") in fais
895-
and not (re.sub("(.+).fa(?:sta)?$", "\\1", op.basename(n)) + ".fai")
895+
and not (re.sub("(.+).f(?:sta)?$", "\\1", op.basename(n)) + ".fai")
896896
in fais
897897
):
898898
not_faidxed.append(

ggd/make_bash.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def add_make_bash(p):
8080
c2.add_argument(
8181
"-dv",
8282
"--data-version",
83-
help="The version of the data (itself) being downloaded and processed (EX: dbsnp-127)",
83+
help="The version of the data (itself) being downloaded and processed (EX: dbsnp-127)" +
84+
" If there is no data version apparent we recommend you use the date associated with the files" +
85+
" or something else that can uniquely identify the 'version' of the data",
8486
required=True,
8587
)
8688
c2.add_argument(
@@ -245,9 +247,9 @@ def make_bash(parser, args):
245247

246248
## Check coordinates
247249
assert (
248-
args.coordinate_based in GENOMIC_COORDINATE_LIST
250+
args.coordinate_base in GENOMIC_COORDINATE_LIST
249251
), "{c} is not an acceptable genomic coordinate base".format(
250-
c=args.coordinate_based
252+
c=args.coordinate_base
251253
)
252254
# ("Please provide a genomic coordinate base from the follow list: {}".format(", ".join(GENOMIC_COORDINATE_LIST)))
253255

@@ -286,7 +288,7 @@ def make_bash(parser, args):
286288
"keywords": args.keyword,
287289
"summary": args.summary,
288290
"tags": {
289-
"genomic-coordinate-base": args.coordinate_based.strip(),
291+
"genomic-coordinate-base": args.coordinate_base.strip(),
290292
"data-version": args.data_version.strip(),
291293
"data-provider": args.data_provider.strip(),
292294
"file-type": [],

tests/test_internet_free.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ def test_make_bash_internet_free():
633633
args = Namespace(authors='me', channel='genomics', command='make-recipe', data_version='27-Apr-2009', data_provider="UCSC",
634634
dependency=[], extra_file=[], genome_build='hg19', package_version='1', keyword=['gaps', 'region'],
635635
name='test-gaps', platform='noarch', script=recipe_file, species='Homo_sapiens', summary='Assembly gaps from UCSC',
636-
coordinate_based="0-based-inclusive", file_type= [],final_file=[])
636+
coordinate_base="0-based-inclusive", file_type= [],final_file=[])
637637

638638
assert make_bash.make_bash((),args)
639639

0 commit comments

Comments
 (0)