Skip to content

simplification of the core.py #1

Open
avvaruakshay wants to merge 20 commits into
masterfrom
code-cleanup
Open

simplification of the core.py #1
avvaruakshay wants to merge 20 commits into
masterfrom
code-cleanup

Conversation

@avvaruakshay

@avvaruakshay avvaruakshay commented Apr 14, 2025

Copy link
Copy Markdown
Collaborator

I have changed the args variable to parameters. Passed this object as input to the cooper and mini_cooper functions instead of individual arguments.

I added comments # ?? wherever the code is unclear or something we need to handle. Please review the code.

@Dhaksnamoorthy

Copy link
Copy Markdown
Collaborator

Read the changes and i have added bitwise flags comments in core.py

@Dhaksnamoorthy Dhaksnamoorthy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave explanations to # ??

Comment thread ATARVA/core.py Outdated
Comment thread ATARVA/core.py Outdated
reads_sampled +=1
cigar = read.cigarstring
# ?? I think the read length and also if the data is SRS or LRS should be provided by the user
# ?? Also should read_length be summed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I summed it to see the average length of the reads. Should i take a median instead

Comment thread ATARVA/core.py Outdated
mini_cooper(parameters, each_bam, contig, tidx, karyotype_list[kidx])
else:
cooper(each_bam, args.regions, args.fasta, aln_format, fetcher[0], args.map_qual, out_file, seq_platform, args.snp_qual, args.snp_count, args.snp_dist, args.max_reads, args.min_reads, args.snp_read, args.phasing_read, -1, args.flank, args.debug_mode, karyotype_list[kidx])
cooper(parameters) # ?? what is purpose of this?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For single-thread mode, this part will be executed based on SRS/LRS, but calling cooper comes only one time

Comment thread ATARVA/readers.py Outdated

srs = False
if args.amplicon:
srs = True # Why is SRS true if amplicon mode is selected?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amplicon mode - process the bam in loci-wise manner
srs with True value will call the mini_cooper / loci-wise mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants