2793951b051283cc051b8ba4afaed511c58b5d5a,anvio/bamops.py,,_get_aligned_sequence_and_reference_positions,#Any#Any#Any#Any#,986
Before Change
ref_consumed, read_consumed = 0, 0
num_mapped = 0
for operation, length, consumes_read, consumes_ref in iterate_cigartuples(cigartuples, cigar_consumption):
if consumes_read and consumes_ref:
aligned_sequence[num_mapped:num_mapped+length] = query_sequence[read_consumed:(read_consumed + length)]
reference_positions[num_mapped:num_mapped+length] = np.arange(ref_consumed + reference_start, ref_consumed + reference_start + length)
num_mapped += length
read_consumed += length
ref_consumed += length
elif consumes_ref:
ref_consumed += length
elif consumes_read:
read_consumed += length
return aligned_sequence, reference_positions
@jit(nopython=True)
After Change
ref_consumed, read_consumed = 0, 0
num_mapped = 0
for i in range(cigartuples.shape[0]):
operation, length = cigartuples[i, :]
consumes_read, consumes_ref = cigar_consumption[operation, :]
if consumes_read and consumes_ref:
aligned_sequence[num_mapped:num_mapped+length] = query_sequence[read_consumed:(read_consumed + length)]
reference_positions[num_mapped:num_mapped+length] = np.arange(ref_consumed + reference_start, ref_consumed + reference_start + length)
num_mapped += length
read_consumed += length
ref_consumed += length
elif consumes_ref:
ref_consumed += length
elif consumes_read:
read_consumed += length
return aligned_sequence, reference_positions
@jit(nopython=True, cache=True)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 20
Instances
Project Name: merenlab/anvio
Commit Name: 2793951b051283cc051b8ba4afaed511c58b5d5a
Time: 2020-03-03
Author: kiefl.evan@gmail.com
File Name: anvio/bamops.py
Class Name:
Method Name: _get_aligned_sequence_and_reference_positions
Project Name: merenlab/anvio
Commit Name: 2793951b051283cc051b8ba4afaed511c58b5d5a
Time: 2020-03-03
Author: kiefl.evan@gmail.com
File Name: anvio/bamops.py
Class Name:
Method Name: _get_aligned_sequence_and_reference_positions
Project Name: merenlab/anvio
Commit Name: 2793951b051283cc051b8ba4afaed511c58b5d5a
Time: 2020-03-03
Author: kiefl.evan@gmail.com
File Name: anvio/bamops.py
Class Name:
Method Name: _vectorize_read
Project Name: merenlab/anvio
Commit Name: 2793951b051283cc051b8ba4afaed511c58b5d5a
Time: 2020-03-03
Author: kiefl.evan@gmail.com
File Name: anvio/bamops.py
Class Name:
Method Name: _trim