Skip to content

Comments

Add GC percentage calculation and report to fastq-peek.sh#10

Closed
coxrs wants to merge 2 commits intomainfrom
rc-gc-prcnt-dev
Closed

Add GC percentage calculation and report to fastq-peek.sh#10
coxrs wants to merge 2 commits intomainfrom
rc-gc-prcnt-dev

Conversation

@coxrs
Copy link
Collaborator

@coxrs coxrs commented Feb 13, 2025

Description

Please include a summary of the changes being made within your PR. Please also include relevant motivation and context.

A for loop was added to count the total number of bases ($TOTAL_BASES) and concatenate the reads ($TOTAL_BASE_COUNT). All G and C basecalls in the reads are then counted ($GC_TOTAL). The GC count is then scaled to prepare for the percentage calculation ($GC_SCALED). The total number of bases and the total number of G and C basecalls are used to calculate the GC percentage of the reads ($GC_PERCENTAGE). This final percentage is reported as "GC percentage: $GC_PERCENTAGE%".

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
A small test data set was used to ensure accurate an GC percentage was calculated. Each step was also printed as it was generated to ensure that the code was accurate. The print commands have been disabled, but not removed.

Checklist:

  • My code adheres to the repository style guide
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass locally with my changes

@coxrs coxrs closed this Feb 13, 2025
@coxrs coxrs reopened this Feb 13, 2025
@coxrs coxrs closed this Feb 20, 2025
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.

1 participant