Skip to content

Per sequence GC content results #132

Closed

Description

@Alexandra2022kzn

Hello! Thank you for developing this tool!

I am comparing Falco 2.0.3 with FastQC 0.11.9 on the same BAM file and noticed that the Per sequence GC content results differ. In my case, FastQC reports WARN, while Falco reports PASS.

I saw in the release notes that GC content analysis was changed in Falco 2.x, including changes to the GC distribution smoothing, but I am not sure what exactly was changed compared with FastQC.

This is a piece of the fastqc_data.txt comparison (FastQC — left, Falco — right):

Image

Could you please explain the reason for these differences and whether identical GC content results with FastQC are expected?

Thanks!

Activity

  1. andrewdavidsmith commented on Oct 1, 2026

    @andrewdavidsmith
    Collaborator

    @Alexandra2022kzn Do you see this on all files you've checked?

  2. Alexandra2022kzn commented on Oct 5, 2026

    @Alexandra2022kzn
    Author

    Hello, @andrewdavidsmith!
    I compared Falco and FastQC results for two real BAM files (159 GB and 82.4 GB), and I see the same GC content difference in both cases. The screenshot below is from the second file.

    Moreover, for this file, Per sequence GC content is the only module with a different status compared with FastQC. Even Per tile sequence quality and Sequence Duplication Levels have the same status in summary.txt (I used --orig-dups for the duplication analysis).

    My command for falco:

    falco -t 48 --verbose -o ./ /inputs/sample1.bam /inputs/sample2.bam
    Image
  3. andrewdavidsmith commented on Oct 5, 2026

    @andrewdavidsmith
    Collaborator

    @Alexandra2022kzn I spent some time looking at the GC content code in FastQC and I also refactored the corresponding code in Falco for easier readability. My conclusion is that there is an inherent smoothing that happens in FastQC that doesn't have a statistical basis. I don't have time right now to fully explain, but one example is if you have 100bp reads, in FastQC each percentage will donate half its counts to the bin one below (except 0, because none are below). This is why you see the ".5" values in the FastQC output. The way this ad hoc smoothing works has very sharp transitions at, for example, 51bp, 101bp, etc. I'm fairly convinced that the output from Falco is more informative, and makes more sense across data sets with different read lengths.

    However, I still assign a grade using the same criteria as FastQC, which is likely not appropriate given that I calculate the percentages histogram differently (and in what I believe is a more sensible way).

    When I get the time I'll try to write something more complete explaining the difference and post the corresponding code from both tools.

  4. Alexandra2022kzn commented on Oct 7, 2026

    @Alexandra2022kzn
    Author

    @andrewdavidsmith Got it, thank you very much for your answer!

    I am looking forward to the new releases in your project.

  5. andrewdavidsmith commented on Oct 12, 2026

    @andrewdavidsmith
    Collaborator

    @Alexandra2022kzn I added an option --orig-gc to falco and it's merged into the main branch with PR #140. There is no release yet for this, but you can use it if you build from source.

    The main remaining difference is that FastQC truncates reads at 1000 or 100 base increments before processing the GC content. For example, a 180bp read will be truncated to 100bp, while a 200bp read will not be truncated. Similarly, a 1800 bp read will be truncated to 1000bp according to my reading. If your reads are, for example, 150bp, then the difference might still be large.

  6. Alexandra2022kzn commented on Oct 12, 2026

    @Alexandra2022kzn
    Author

    Thank you very much! I'll test it as soon as I can.

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

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