Skip to content
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

No attr assembly compare bug #88

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ariba/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def __init__(self,
self.final_assembly_read_depths = os.path.join(self.root_dir, 'assembly.reads_mapped.bam.read_depths.gz')
self.final_assembly_vcf = os.path.join(self.root_dir, 'assembly.reads_mapped.bam.vcf')
self.samtools_vars_prefix = self.final_assembly_bam
self.assembly_compare = None
self.assembly_compare_prefix = os.path.join(self.root_dir, 'assembly_compare')

self.mummer_variants = {}
Expand Down
2 changes: 1 addition & 1 deletion ariba/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def _write_catted_genes_matching_refs_fasta(self, outfile):
f = pyfastaq.utils.open_file_write(outfile)

for gene in sorted(self.clusters):
if self.clusters[gene].assembly_compare.gene_matching_ref is not None:
if self.clusters[gene].assembly_compare is not None and self.clusters[gene].assembly_compare.gene_matching_ref is not None:
seq = copy.copy(self.clusters[gene].assembly_compare.gene_matching_ref)
seq.id += '.' + '.'.join([
self.clusters[gene].assembly_compare.gene_matching_ref_type,
Expand Down
4 changes: 4 additions & 0 deletions ariba/test_run_data/non_coding.fa
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ GTGCCCGCCGCCCACGAACGAACTGCGGTGAGATGCTTAGGGAACGCCATCCGAGATCAC
>noncoding2
TCTTTAACTGTTCACGACTGTATCGCGGCTTGCAAATCTTAAGTTCTTCCCAAGCGCGCT
GCGATACAAATCCCAAGTTTAGCGGACAGTTCACGCCGGGTTCTAAGAATGTATGCGTCC
>noncoding3
CTAACTTACTACTATGACTGACTGACTGACTGACTGATCGACTGCTGACATCTGATCGAT
CATCCTGTCGACATCATATCTCGATCGATCGATCGACTGACTGACTGACTGACTGAATCT
CACGTACTGACTCATCATCATCATACTCATCATATCATCGATCGATCATCTGATCTGATG
4 changes: 4 additions & 0 deletions ariba/test_run_data/reads_1.fq
Original file line number Diff line number Diff line change
Expand Up @@ -902,3 +902,7 @@ IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
ATCTTTAACTGTTCACGACTGTATCGCGGCTTGCAAATCTTAAGTTCTTC
+
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
@noncoding3/1
CATCCTGTCGACATCATATCTCGATCGATCGATCGACTGACTGACTGACT
+
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
4 changes: 4 additions & 0 deletions ariba/test_run_data/reads_2.fq
Original file line number Diff line number Diff line change
Expand Up @@ -902,3 +902,7 @@ IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
TCTTAGAACCCGGCGTGAACTGTCCGCTAAACTTGGGATTTGTATCGCAG
+
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
@noncoding3/2
CATCAGATCAGATGATCGATCGATGATATGATGAGTATGATGATGATGAG
+
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
4 changes: 4 additions & 0 deletions ariba/test_run_data/ref_fasta_to_make_reads_from.fa
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ TATCGCGGCTTGCAAATCTTAAGTTCTTCCCAAGCGCGCTGCGATACAAATCCCAAGTTT
AGCGGACAGTTCACGCCGGGTTCTAAGAATGTATGCGTCCGTTCGTTTTGTGCAATTGTC
TCTGTATGGACCAATTGTCTACTGGACCGGTAGAAACATAAACGCTCTCTACTCTTCATG
GCGCTATCGGGGAGGGGGCG
>noncoding3
CTAACTTACTACTATGACTGACTGACTGACTGACTGATCGACTGCTGACATCTGATCGAT
CATCCTGTCGACATCATATCTCGATCGATCGATCGACTGACTGACTGACTGACTGAATCT
CACGTACTGACTCATCATCATCATACTCATCATATCATCGATCGATCATCTGATCTGATG