Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Using pretty printers on BioSeq after translation results in an empty source sequence #122

Open
kMutagene opened this issue Sep 23, 2021 · 5 comments
Labels

Comments

@kMutagene
Copy link
Member

kMutagene commented Sep 23, 2021

Describe the bug
Using pretty printers on BioSeq results in an empty source sequence

To Reproduce

create BioSeq, pretty print it

#r "nuget: BioFSharp, 2.0.0-beta6"
#r "nuget: BioFSharp.IO, 2.0.0-beta6"

open BioFSharp
open BioFSharp.IO

let myGene = 
    BioSeq.ofNucleotideString "ATGGCTAGATCGATCGATCGGCTAACGTAA"
    |> BioSeq.complement
    |> BioSeq.transcribeTemplateStrand
    |> BioSeq.translate 0
  
myGene |> Seq.length //10
  
myGene |> FSIPrinters.prettyPrintBioCollection

myGene |> Seq.length //0

and investigate the original sequence afterwards

Expected behavior
myGene stays the same after the printer

Additional information

BioArray works as expected, so the problem seems to lie in the intternals of BioSeq:

#r "nuget: BioFSharp, 2.0.0-beta6"
#r "nuget: BioFSharp.IO, 2.0.0-beta6"

open BioFSharp
open BioFSharp.IO

let myGene = 
    BioArray.ofNucleotideString "ATGGCTAGATCGATCGATCGGCTAACGTAA"
    |> BioArray.complement
    |> BioArray.transcribeTemplateStrand
    |> BioArray.translate 0
  
myGene.Length
  
myGene |> FSIPrinters.prettyPrintBioCollection

myGene.Length

Leaving out |> BioSeq.translate 0 also leaves things unaffected, so the problem seems to be in the translate function

@kMutagene kMutagene added the bug label Sep 23, 2021
@olegvolovoda
Copy link

That are a whole set of reasons bytes disappears. For now, evidence were received about quantum effects decrease data
size while pretty print state is measured.

@kMutagene
Copy link
Member Author

That are a whole set of reasons bytes disappears. For now, evidence were received about quantum effects decrease data

size while pretty print state is measured.

u ok?

@olegvolovoda
Copy link

olegvolovoda commented Jun 2, 2023 via email

@kMutagene
Copy link
Member Author

I appreciate your correspondence. It is imperative to underscore that in the absence of a comprehensive appraisal pertaining to the laboratory-specific concerns associated with the phenomenon known as the 'pretty print relativity' effect, it would be premature, if not altogether imprudent, to assert categorical assertions regarding its nature. Nonetheless, it behooves us to entertain the possibility of alternative variables capable of confounding data elimination processes, including but not limited to the influence of electrical and magnetic fields. It is incumbent upon us to undertake further rigorous scrutiny and rigorous analysis in order to procure a more lucid comprehension of the matter at hand.

@omaus
Copy link
Member

omaus commented Jun 2, 2023

That are a whole set of reasons bytes disappears. For now, evidence were received about quantum effects decrease data size while pretty print state is measured.

Without proper lab issue examination, it's too early to make distinct
statements about the 'pretty print relativity' effect. Although other data
eliminating factors could be electrical and magnetic fields.

If I understood you correctly, you want to state that bytes have disappeared due to cosmic radiation – which may even be correct. However, such effects only occur very rarely (especially not with adequately shielded RAMs) and usually only affect individual bits. That such a thing would lead to such specific effects and not to a system crash (much more probable) is so extremely unlikely that it can be neglected. The assumption of a programmatic error is preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants