Skip to content

Commit

Permalink
Workaround for CI on assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
iquasere committed Jul 26, 2021
1 parent 31f99b2 commit 5f69b5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: docker run mosca /bin/bash -c "python /share/MOSCA/scripts/preprocess.py -i MOSCA/ci/mt4_R1.fastq,MOSCA/ci/mt4_R2.fastq -t 14 -d mrna -rd resources_directory -n mt_name1 -o output_pp"

- name: Assembly
run: docker run mosca /bin/bash -c "python /share/MOSCA/scripts/assembly.py -r MOSCA/ci/mg_R1.fastq,MOSCA/ci/mg_R2.fastq -t 16 -o output_ass"
run: docker run mosca /bin/bash -c "python /share/MOSCA/scripts/assembly.py -r MOSCA/ci/mg_R1.fastq,MOSCA/ci/mg_R2.fastq -t 16 -o output_ass --max-ref-number 0"

- name: Annotation
run: docker run mosca /bin/bash -c "python /share/MOSCA/scripts/annotation.py -i MOSCA/ci/contigs.fasta -t 16 -o output_ann -db MOSCA/ci/ad_uniprot.fasta"
7 changes: 5 additions & 2 deletions workflow/scripts/assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def get_arguments(self):
help="Standard deviation of insert size [2500]")
parser.add_argument("-bq", "--base-qual", type=str, default='phred33', choices=['phred33', 'phred64'],
help="Quality format of base call of reads files")
parser.add_argument("-mrn", "--max-ref-number", type=int, default=50,
help="Maximum references to be downloaded by MetaQUAST")


args = parser.parse_args()
Expand All @@ -62,8 +64,9 @@ def percentage_of_reads(self, file):
lines = handler.readlines()
return lines[-1].split('%')[0]

def run_metaquast(self, contigs, out_dir, threads='12'):
run_command(f'metaquast.py --threads {threads} --output-dir {out_dir} {contigs}')
def run_metaquast(self, contigs, out_dir, threads='12', max_ref_number=50):
run_command(f'metaquast.py --threads {threads} --output-dir {out_dir} --max-ref-number {max_ref_number} '
f'{contigs}')

def close_gaps(self, scaffolds, contigs, output_basename, read1, read2, read_length=150, insert_size=1500,
std_insert=10, threads=14, base_qual='phred33'):
Expand Down

0 comments on commit 5f69b5e

Please sign in to comment.