Skip to content

Commit

Permalink
Merge branch 'release/1.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Oct 11, 2018
2 parents 6c37df8 + 1b81431 commit accdfa6
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 18 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ env:
language: python

python:
- "3.4"
- "3.6"

install:
Expand Down
9 changes: 7 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# CHANGES

## 1.4.0

* Correct base config for file types accepted. File_2 should only accept `f(?:ast)q.gz` (upper/lower)
* Only allow compresed fastq.

## 1.3.0

* Fixes `valid_q` value of `seq-valid` json report. Always returned false previously.
* Correct command line help text for `seq-valid` input option.
* Extends the `seq-valid` json report to include the ascii range detected and which types of
phred score these align to.
* Extends the `seq-valid` json report to include the ascii range detected and which types of phred
score these align to.
* Additional command line options for `seq-valid`
* `-o | --output` - Generates an interleaved gzip compressed fastq file when input is paired fastq
* `-q | --qc` - Specify the number of pairs to be used when assessing the phred quality range
Expand Down
4 changes: 2 additions & 2 deletions cgp_seq_input_val/config/IMPORT-1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
{"value": "N"}]
},
"validate_ext": {
"File": [".fastq", ".fastq.gz", ".fq", ".fq.gz", ".bam", ".cram"],
"File_2": [".fastq", ".fastq.gz", ".fq", ".fq.gz", ".bam", ".cram"]
"File": [".fastq.gz", ".fq.gz", ".bam", ".cram"],
"File_2": [".fastq.gz", ".fq.gz"]
}
}
}
17 changes: 10 additions & 7 deletions cgp_seq_input_val/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,15 +528,18 @@ def file_ext_check(self, rules):
(base, ext) = os.path.splitext(base)
full_ext = ext + extra

if full_ext not in rules[f_type]:
raise ValidationError("File extension of '%s' is not valid, \
'%s' on line %d"
% (full_ext, f_type, cnt))
if full_ext.lower() not in rules[f_type]:
valid_extn = ', '.join(rules[f_type])
raise ValidationError(
f"File extension of '{full_ext}' is not valid ({valid_extn}), " +
f"'{f_type}' on line {cnt} of manifest."
)

if last_ext is not None and last_ext != full_ext:
raise ValidationError("File extensions for same row must \
match, '%s' vs '%s' on line %d"
% (last_ext, full_ext, cnt))
raise ValidationError(
"File extensions for same row must match," +
f"'{last_ext}' vs '{full_ext}' on line {cnt} of manifest."
)
last_ext = full_ext

def heading_check(self, config):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
'url': 'https://github.com/cancerit/cgp_seq_input_val',
'download_url': '',
'author_email': '[email protected]',
'version': '1.3.0',
'python_requires': '>= 3.4',
'version': '1.4.0',
'python_requires': '>= 3.6',
'setup_requires': ['pytest'],
'install_requires': ['progressbar2', 'xlrd', 'xopen'],
'packages': ['cgp_seq_input_val'],
Expand Down
1 change: 0 additions & 1 deletion tests/data/file_set_good/banana.fastq

This file was deleted.

Binary file added tests/data/file_set_good/banana.fastq.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/data/file_set_good/files_good.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Seq Protocol: WGS
Data Type: DNA
Mark Duplicates: Y
Group_ID Sample Normal_Tissue Group_Control Library File File_2
1 Bob N N 1 banana.fastq gru.fastq
1 Bob N N 1 banana.fastq.gz gru.fastq.gz
1 Stuart Y N 1 bello.bam
1 Kevin Y Y 1 read1.fq.gz read2.fq.gz
1 change: 0 additions & 1 deletion tests/data/file_set_good/gru.fastq

This file was deleted.

Binary file added tests/data/file_set_good/gru.fastq.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/data/with_uuid.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Seq Protocol: WGS
Data Type: DNA
Mark Duplicates: Y
Group_ID Sample Normal_Tissue Group_Control Library File File_2
1 Bob N N 1 banana.fastq gru.fastq
1 Bob N N 1 banana.fastq.gz gru.fastq.gz
1 Stuart Y N 1 bello.bam
1 Kevin Y Y 1 read1.fq.gz read2.fq.gz

0 comments on commit accdfa6

Please sign in to comment.