Skip to content

Commit

Permalink
Merge pull request #105 from PMCC-BioinformaticsCore/reduce-test-files
Browse files Browse the repository at this point in the history
Reduce test files
  • Loading branch information
junyk authored Jun 1, 2021
2 parents 408128b + dca6046 commit d8d021c
Show file tree
Hide file tree
Showing 103 changed files with 131 additions and 1,422,922 deletions.
25 changes: 5 additions & 20 deletions janis_bioinformatics/tools/babrahambioinformatics/fastqc/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,21 +248,14 @@ def outputs(self) -> List[ToolOutput]:
]

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"reads": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R1.fastq.gz",
),
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R2.fastq.gz",
),
f"{remote_dir}/NA12878-BRCA1_R1.fastq.gz",
f"{remote_dir}/NA12878-BRCA1_R2.fastq.gz",
],
"threads": 1,
},
Expand All @@ -284,16 +277,8 @@ def tests(self):
name="minimal",
input={
"reads": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R1.fastq.gz",
),
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R2.fastq.gz",
),
f"{remote_dir}/NA12878-BRCA1_R1.fastq.gz",
f"{remote_dir}/NA12878-BRCA1_R2.fastq.gz",
],
"threads": 1,
},
Expand Down
7 changes: 2 additions & 5 deletions janis_bioinformatics/tools/bcftools/sort/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,13 @@ def bind_metadata(self):
)

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"outputType": "z",
"vcf": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.generated.gathered.vcf.gz",
),
"vcf": f"{remote_dir}/NA12878-BRCA1.generated.gathered.vcf.gz",
},
output=CompressedVcf.basic_test(
"out",
Expand Down
13 changes: 3 additions & 10 deletions janis_bioinformatics/tools/bedtools/genomecoveragebed/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,13 @@ def outputs(self):
]

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"inputBam": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.markduped.bam.bam",
),
"genome": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.genome_file.txt",
),
"inputBam": f"{remote_dir}/NA12878-BRCA1.markduped.bam.bam",
"genome": f"{remote_dir}/NA12878-BRCA1.genome_file.txt",
},
output=TextFile.basic_test(
"out",
Expand Down
43 changes: 8 additions & 35 deletions janis_bioinformatics/tools/bwa/mem/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,61 +287,34 @@ def bind_metadata(self):
]

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"reads": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R1.fastq.gz",
),
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R2.fastq.gz",
),
f"{remote_dir}/NA12878-BRCA1_R1.fastq.gz",
f"{remote_dir}/NA12878-BRCA1_R2.fastq.gz",
],
"reference": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.chr17.fasta",
),
"reference": f"{remote_dir}/Homo_sapiens_assembly38.chr17.fasta",
"markShorterSplits": True,
"readGroupHeaderLine": "@RG\tID:NA12878-BRCA1\tSM:NA12878-BRCA1\tLB:NA12878-BRCA1\tPL:ILLUMINA",
"threads": 16,
},
output=Bam.basic_test(
"out",
8628527,
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.bwamem.flagstat",
),
f"{remote_dir}/NA12878-BRCA1.bwamem.flagstat",
),
),
TTestCase(
name="minimal",
input={
"reads": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R1.fastq.gz",
),
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R2.fastq.gz",
),
f"{remote_dir}/NA12878-BRCA1_R1.fastq.gz",
f"{remote_dir}/NA12878-BRCA1_R2.fastq.gz",
],
"reference": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.chr17.fasta",
),
"reference": f"{remote_dir}/Homo_sapiens_assembly38.chr17.fasta",
"markShorterSplits": True,
"readGroupHeaderLine": "@RG\tID:NA12878-BRCA1\tSM:NA12878-BRCA1\tLB:NA12878-BRCA1\tPL:ILLUMINA",
"threads": 16,
Expand Down
43 changes: 8 additions & 35 deletions janis_bioinformatics/tools/common/bwaaligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,17 @@ def bind_metadata(self):
self.metadata.version = "1.1"

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"sample_name": "NA12878-BRCA1",
"fastq": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R1.fastq.gz",
),
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R2.fastq.gz",
),
f"{remote_dir}/NA12878-BRCA1_R1.fastq.gz",
f"{remote_dir}/NA12878-BRCA1_R2.fastq.gz",
],
"reference": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.chr17.fasta",
),
"reference": f"{remote_dir}/Homo_sapiens_assembly38.chr17.fasta",
"cutadapt_qualityCutoff": 15,
"cutadapt_minimumLength": 50,
"bwamem_markShorterSplits": True,
Expand All @@ -120,34 +109,18 @@ def tests(self):
"out",
2826000,
49688,
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.bam.flagstat",
),
f"{remote_dir}/NA12878-BRCA1.bam.flagstat",
),
),
TTestCase(
name="minimal",
input={
"sample_name": "NA12878-BRCA1",
"fastq": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R1.fastq.gz",
),
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1_R2.fastq.gz",
),
f"{remote_dir}/NA12878-BRCA1_R1.fastq.gz",
f"{remote_dir}/NA12878-BRCA1_R2.fastq.gz",
],
"reference": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.chr17.fasta",
),
"reference": f"{remote_dir}/Homo_sapiens_assembly38.chr17.fasta",
"cutadapt_qualityCutoff": 15,
"cutadapt_minimumLength": 50,
"bwamem_markShorterSplits": True,
Expand Down
49 changes: 9 additions & 40 deletions janis_bioinformatics/tools/common/gatkbasecalbam.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,55 +77,24 @@ def bind_metadata(self):
)

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"bam": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.markduped.bam",
),
"reference": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.chr17.fasta",
),
"snps_dbsnp": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.dbsnp138.BRCA1.vcf.gz",
),
"snps_1000gp": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"1000G_phase1.snps.high_confidence.hg38.BRCA1.vcf.gz",
),
"known_indels": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.known_indels.BRCA1.vcf.gz",
),
"mills_indels": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Mills_and_1000G_gold_standard.indels.hg38.BRCA1.vcf.gz",
),
"intervals": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"BRCA1.hg38.bed",
),
"bam": f"{remote_dir}/NA12878-BRCA1.markduped.bam",
"reference": f"{remote_dir}/Homo_sapiens_assembly38.chr17.fasta",
"snps_dbsnp": f"{remote_dir}/Homo_sapiens_assembly38.dbsnp138.BRCA1.vcf.gz",
"snps_1000gp": f"{remote_dir}/1000G_phase1.snps.high_confidence.hg38.BRCA1.vcf.gz",
"known_indels": f"{remote_dir}/Homo_sapiens_assembly38.known_indels.BRCA1.vcf.gz",
"mills_indels": f"{remote_dir}/Mills_and_1000G_gold_standard.indels.hg38.BRCA1.vcf.gz",
"intervals": f"{remote_dir}/BRCA1.hg38.bed",
},
output=BamBai.basic_test(
"out",
2600000,
21000,
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.recalibrated.flagstat",
),
f"{remote_dir}/NA12878-BRCA1.recalibrated.flagstat",
),
)
]
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,13 @@ def bind_metadata(self):
)

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"bams": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.sorted.bam",
)
f"{remote_dir}/NA12878-BRCA1.sorted.bam",
],
"maxRecordsInRam": 5000000,
"createIndex": True,
Expand All @@ -86,22 +83,14 @@ def tests(self):
"out",
2829000,
3780,
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.markduped.bam.flagstat",
),
f"{remote_dir}/NA12878-BRCA1.markduped.bam.flagstat",
),
),
TTestCase(
name="minimal",
input={
"bams": [
os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.sorted.bam",
)
f"{remote_dir}/NA12878-BRCA1.sorted.bam",
],
"maxRecordsInRam": 5000000,
"createIndex": True,
Expand Down
13 changes: 3 additions & 10 deletions janis_bioinformatics/tools/common/splitmultiallele.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,13 @@ def doc(self):
""".strip()

def tests(self):
remote_dir = "https://swift.rc.nectar.org.au/v1/AUTH_4df6e734a509497692be237549bbe9af/janis-test-data/bioinformatics/wgsgermline_data"
return [
TTestCase(
name="basic",
input={
"vcf": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"NA12878-BRCA1.haplotype_uncompressed.stdout",
),
"reference": os.path.join(
BioinformaticsTool.test_data_path(),
"wgsgermline_data",
"Homo_sapiens_assembly38.chr17.fasta",
),
"vcf": f"{remote_dir}/NA12878-BRCA1.haplotype_uncompressed.stdout",
"reference": f"{remote_dir}/Homo_sapiens_assembly38.chr17.fasta",
},
output=Vcf.basic_test(
"out",
Expand Down
Loading

0 comments on commit d8d021c

Please sign in to comment.