• 41 Posts
  • 2.17K Comments
Joined 2 years ago
cake
Cake day: August 4th, 2023

help-circle

  • Well, just taking rs3746544 as an example, the SNPedia page has this chart at the bottom of the right-hand column:

    An image showing frequency of different genotypes for rs3746544 across several different specific populations

    Notice there are only three colors there. Just eyeballing it, it seems most people have either the AA or AC genotype, with CC making up a pretty small minority.

    But the fact that TT doesn’t register at all on that chart and otherwise just isn’t mentioned anywhere on the page at all makes me think I must be missing something. (Which wouldn’t surprise me. It is genetics, after all. There are definitely tons of rabbit holes to fall down in that area of study.)

    Someone else mentioned in a comment that it must be a mutation. (I assume they mean a mutation that happened recently enough – few enough steps up my ancestral lineage – that sources like SNPedia have just never seen it before.) And if I only had one example, and if it was only one allele and not on both strands, I might be inclined to agree.But I have… a lot of examples of that. Just doing some napkin math, I got a rate of about 16.5% “impossible” or undocumented genotypes. There’s no way that for 16.5% of well-known/well-studied SNPs I happen to have a completely undocumented double-strand mutation, right?

    (Just to explain my methodology for coming up with that 16.5% figure, I took all the SNP’s listed on these two pages: one and two, and found all SNPs for which a) genotypes are documented on the page and b) I’ve got a genotype for that SNP in at least one of the data files I got from either 23andme or AncestryDNA (or both). That got me 139 examples. Of those, 23 of my SNP’s didn’t match any of the genotypes listed on the Eupedia pages. For a rate of 23/139=0.1654676…~=16.5% .)

    (Side note: oddly of the 23 “mismatch” examples I mentioned, my genotype doesn’t have a single allele in common with the documented possible alleles for the SNP. For example, I don’t have any AT’s where the documented alleles are AA, AC, and CC. My genes either match the documented alleles or have no alleles in common with the documented genotypes. Which seems even stranger.)

    (Another side note: if 23andme and AncestryDNA didn’t agree on the genotype, I’d be inclined to think it was an error on one of their parts, but I haven’t found any specific SNPs where they disagree with each other yet.)

    So, to get back to your main question:

    Does “possible” mean “normal values for x% of the population?”

    By “impossible”, I mean I haven’t been able to find any documentation of anyone else having the same genotype as I have for that particular SNP. And that makes me feel like I’m almost definitely not understanding something.

    I kindof doubt that the genotypes I have for these mismatches are actually exceedingly rare or completely undocumented or anything. I think probably someone knows exactly why I’d be seeing the results I’m seeing (and it probably isn’t tons of obscure mutations or anything.) So, honestly, “impossible” is probably bad wording.





  • Ah. Ok. Well, in that case, I’ve got an idea.

    And, being honest here, I’ve learned this in the last few minutes, but apparently MP4 can technically only hold a certain number of different kinds of audio. There are some not-to-spec ways to put things like uncompressed WAV or FLAC into an MP4, but a lot of tools don’t support that.

    I just did some tests with FFMPEG and was not able to embed FLAC or WAV (pcm_s16le or pcm_s24le) into an M4A container, but I was able to embed ALAC into an M4A file with the following command:

    ffmpeg -i zelda_25th_symphony_01.flac -acodec alac zelda_25th_symphony_01.m4a
    

    And mpv is able to play the resulting M4A file just fine.

    So, it seems like what you’re going for is doable, at least depending which tool you use. But FFMPEG can do it. Whether your player of choice can play it is another question, but it definitely seems worth a try.

    Oh, by the way, the M4A file is a tiny bit larger than the FLAC file:

    tootsweet@computer /tmp $ ls -lah zelda*
    -rw-r--r--. 1 tootsweet tootsweet 43M Nov  8 11:16 zelda_25th_symphony_01.flac
    -rw-r--r--. 1 tootsweet tootsweet 44M Nov  8 11:40 zelda_25th_symphony_01.m4a
    tootsweet@computer /tmp $ ls -la zelda*
    -rw-r--r--. 1 tootsweet tootsweet 44481504 Nov  8 11:16 zelda_25th_symphony_01.flac
    -rw-r--r--. 1 tootsweet tootsweet 45660506 Nov  8 11:40 zelda_25th_symphony_01.m4a
    tootsweet@computer /tmp $
    

    (Username and computer hostname changed to protect the guilty.)


  • MP4 is a “container format” designed for having multiple media streams (typically video, audio, and subtitles) in one file. Despite the name, it’s not the successor to MP3. The fact that a file is an MP4 doesn’t tell you what compression was used to compress whatever audio (or other) streams might happen to be in the file. You can make an MP4 file with a single FLAC audio stream in it. Or an MP4 file with a single MP3 or OGV or Speex stream in it. And the size of an MP4 can vary wildly based on what codecs were used to compress whatever streams might be in it. An .m4a file is just an MP4 file with a different extension intended to indicate that that particular MP4 file only has audio in it.

    But anyway, to your question, the thing with lossless compression like FLAC is that it gives better fidelity at the cost of larger file sizes. Not as large as uncompressed audio files like WAVE files, but much larger typically than lossy-compressed formats like MP3, OGV, Speex, Opus, AAC, WMA, etc.

    If you’re wanting to keep the same level of fidelity (that is, lossless), your options are basically (and being honest here, I got this list with like 30 seconds of googling) FLAC, ALAC, Ape, and WavePack. I’ve seen a couple of mentions that Ape may be a very tiny bit better than FLAC, but at the cost of much more computational complexity (e.g. more CPU usage). And WavePack might (I’m not sure) be a tiny bit better in some fairly narrow cases. ALAC seems mostly agreed to be inferior to FLAC in almost every way.

    So, you could play with other lossless formats and see if you could shave a tiny bit off of your file sizes relative to FLAC, but the chances you’ll get a significant savings over FLAC without using a lossy format is are basically nil. And other lossless formats are likely to be more computationally intensive and less supported by hardware and software.

    And this isn’t just because FLAC is not as good as it could be. Lossless compression is inherently going to give you bigger file sizes than lossy. FLAC has a certain amount of information it has to pack into a stream and, being lossless, it’s not allowed to strategically thow away part of that information to achieve a “balance” of fidelity versus file size the way lossy formats do. (Lossy formats mostly prioritize for discarding things that the human ear isn’t likely to hear like frequencies above or below the range of human hearing.) There’s only so much a compression algorithm can do to reduce file size within those constraints. And honestly, FLAC is really good at compressing efficiently within those constraints.

    Now, all that said, I think most FLAC encoders offer the option of tuning the tradeoff between compression efficiency and CPU usage when decoding. If you wanted smaller FLAC files, again, the savings aren’t likely to be huge, but you could just up the compression level to 11 and let your CPU do a lot of extra work during playback just to save hard drive space. How to tune that compression-level parameter would depend what software you’re using to do the encoding. FFMPEG, for instance, has a compression level parameter.


  • You can take my terminal when you can pry it from my cold, dead, hands.

    Any one-liner you put together, you can re-run trivially. You can rerun it with modifications trivially. You can wrap it in a for loop that runs it with different parameters trivially. You can stick it in a file and make a reusable Bash script. It’s far easier to show someone else how you did it (just copy/paste the text of your terminal session) than dozens of screenshots of a point-and-click adventure (and not in a good way) GUI app. Bash commands are easier over SSH than GUI apps over RDP or VNC or whatever. You can’t script a GUI app.

    I seriously find myself wondering why someone would use a GUI for something they can do with a terminal. Learning curve is the only reason I can think of.

    I frequently find myself creating tools that let me do with a terminal what I formerly could only do with a GUI tool.









  • Wow. Huge topic. And it depends on a ton of things. And I definitely don’t feel like I’ve got it all figured out myself.

    If you’re young and just for the first time having to manage your own affairs rather than depend on parents to help with that, then self-help kind of stuff might well be a fine place to start. (Just avoid Jordan Peterson.) If you’re older and feel like you’ve had the time needed to develop those skills and still don’t have them, it’s likely there’s something deeper going on that might benefit from therapy.

    I personally cared for my ailing grandmother for a long time. And that shit’s hard work, and takes a lot of time. In the process, I let a lot of things go by the wayside like yardwork, home repair, and organization. Now that she has passed, I find myself with a lot of remedial work to catch up on. I feel like I’m making progress. It’s frustrating and slow, but it is progressing and that’s the important part.





  • I can definitely see a lot of good applications for this way of doing things.

    It does seem like I often run across “error handling” code that literally just catches a bunch of different exception types and throws a new exception with the same content from the caught error just reworded, adding literally zero helpful information in the process.

    It’s definitely the case that sometimes the exact sort of crash you’d get if you didn’t handle errors is exactly the best sort of exception output the program could do given its particular use case and target audience. Or at least it might be best to let the error be handled much further away in the call stack.


  • I feel like I’d rather die for having to much faith in humanity than too little. And on that metric, I can’t help but think BriannaWu was doing something right approaching right-wing nutjobs the way she did.

    But more importantly, I’d rather not die in either of the aforementioned ways. What she did was definitely done out of (perhaps admirable) naïveté. And she’s clearly grown as a person from the experience.

    All that said, I don’t know that she’s got the best positions on everything. She says she believes that “trans women don’t belong in women’s sports” and she wants a “middle ground on bathrooms”, both of which seem… problematic (even if the right wing wasn’t so maximalist and radical about things.) And that part makes me wonder if the rest of the tweet was made in good faith, honestly.