Skip to content
This repository was archived by the owner on Jul 20, 2021. It is now read-only.

error Sequence mapping and clustering  #320

@theokirkland

Description

@theokirkland

Describe the environment

What version of IAB are you reading (e.g. v0.0.1)? Not sure - just downloaded 1/1/19

from iab import __version__ as iab_version
print(iab_version)

Describe the problem

command line 8
clusters, num_alignments = cluster([s1, s2], 0.70,
furthest_neighbor, aligner=global_pairwise_align_nucleotide, verbose=True) gave an error

s1
Created OTU
s2
OTU 1


AttributeError Traceback (most recent call last)
in
1 clusters, num_alignments = cluster([s1, s2], 0.70,
----> 2 furthest_neighbor, aligner=global_pairwise_align_nucleotide, verbose=True)
3 show_clusters(clusters, plot_labels=True)

in cluster(seqs, similarity_threshold, cluster_fn, aligner, verbose)
11 if verbose: print(" OTU %d" % i)
12 clustered, alignment_results = cluster_fn(
---> 13 query_seq, cluster, similarity_threshold, aligner, verbose=verbose)
14 num_alignments += len(alignment_results)
15 if clustered:

in furthest_neighbor(seq, cluster, similarity_threshold, aligner, verbose)
40 alignment_results = []
41 for node in cluster.nodes():
---> 42 aln, _, _ = aligner(seq, cluster.node[node]['seq'])
43 percent_similarity = 1. - aln[0].distance(aln[1])
44 alignment_results.append((node, percent_similarity))

AttributeError: 'Graph' object has no attribute 'node'

show_clusters(clusters, plot_labels=True)

Steps to reproduce

Followed steps 1-7 in Furthest Neighbor Clustering
command 8 clusters, num_alignments = cluster([s1, s2], 0.70,
furthest_neighbor, aligner=global_pairwise_align_nucleotide, verbose=True)

Observed Results

s1
Created OTU
s2
OTU 1


AttributeError Traceback (most recent call last)
in
1 clusters, num_alignments = cluster([s1, s2], 0.70,
----> 2 furthest_neighbor, aligner=global_pairwise_align_nucleotide, verbose=True)
3 show_clusters(clusters, plot_labels=True)

in cluster(seqs, similarity_threshold, cluster_fn, aligner, verbose)
11 if verbose: print(" OTU %d" % i)
12 clustered, alignment_results = cluster_fn(
---> 13 query_seq, cluster, similarity_threshold, aligner, verbose=verbose)
14 num_alignments += len(alignment_results)
15 if clustered:

in furthest_neighbor(seq, cluster, similarity_threshold, aligner, verbose)
40 alignment_results = []
41 for node in cluster.nodes():
---> 42 aln, _, _ = aligner(seq, cluster.node[node]['seq'])
43 percent_similarity = 1. - aln[0].distance(aln[1])
44 alignment_results.append((node, percent_similarity))

AttributeError: 'Graph' object has no attribute 'node'

Expected Results

  • What did you expect to happen? Get a graph as well as the text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions