Tuesday, April 10, 2018

FMod - Possible improvements coming

It's been a while since I've made any significant feature additions to Abiathar. I recently chatted with a prolific modder who had some requests for enhancements. He suggested being able to zoom the simultaneous tileset, a request which I've now heard from multiple people, so that's probably a good thing to implement. I haven't done it yet because it isn't really compatible with having a single zoom slider, but I'm willing to remove the zoom slider in favor of a more useful feature. I might also consider having a second independent slider to control the tileset (if that wouldn't make the status bar too crowded).

Another request was the ability to remember multiple stamps (copied blocks). Abiathar already has a place to stash a few tiles of the user's choosing, but no way to persist arrangements of tiles other than re-copying when necessary. I've been thinking about doing some refactoring to expose the clipboard through the API, and expanding the copy system would be a great time to do that.

I have a lot of real-life work to do in the coming weeks, but if I get some free time I'll look into these additions.

Sunday, April 8, 2018

1000 Genomes Phase 1 data has some SNPs that Phase 3 doesn't

Yesterday I noticed that the 1000 Genomes Phase 3 data set is missing some common SNPs. Today I checked whether the SNP I was looking for was in the Phase 1 data set, and it is. The Phase 1 VCF lists it as the same high quality as the rest of the SNPs that I could find in the Phase 3 VCF, so I'm not sure why it was dropped. It's almost certainly real - I've been working with a different set of sequences with many reads that contain the mutation. The proportion of non-co-occurrence from the Phase 1 VCF is an order of magnitude higher than that from the Phase 3 VCF, whether or not the lost-and-found SNP is included in the Phase 1 calculation. This suggests that there is a bit more error in the Phase 1 reads than Phase 3.

1000 Genomes VCF files might not have all SNPs

I've been trying to determine the co-occurrence of a handful of SNPs using a 1000 Genomes VCF file, but one of the SNPs seems to be absent. Its rsID doesn't appear in the VCF, nor can I find it by position. It's a pretty common SNP if I'm reading its NCBI page right; I expect that it should co-occur with the others that I can find in the VCF.

Per the IGSR site, a couple million variations were culled in the production of the Phase 3 data set (that I'm using) for a handful of reasons including quality control. It's possible that this SNP didn't quite make the cut due to uncertainty.

Friday, April 6, 2018

When Android Studio can't resolve certain symbols or imports

Today I needed to start an Android Studio project from an existing template. When opening it, though, I saw that a handful of the imports had failed with "cannot resolve symbol." This Stack Overflow question has a few different solutions, none of which (and no combinations or repeats of which) worked for me. I eventually found - in a different Stack Overflow post - the idea of deleting/moving the .idea folder. This actually worked! The first time Android Studio opened the project after the move, it threw a bunch of errors, but then it managed to regenerate everything it needed. Since run configurations are stored in .idea\runConfigurations, I made sure to copy that folder over from the old .idea to the regenerated one. After that, things appear to be working as intended.

Thursday, April 5, 2018

The read-only bit doesn't make folders read-only

In Windows, folders can be set read-only, but this doesn't do anything to stop them from being changed. For directories, the read-only bit is part of a signal that the folder might want special handling by the shell. When Explorer sees a directory marked read-only and system, it checks for a desktop.ini file inside that might specify special appearance or behavior for the folder. (This is why the Fonts folder is so non-directory-like, for instance.)

If you need to protect a folder from changes, adjust the access control list on the Security tab of the Properties window.

Monday, April 2, 2018

Multidimensional arrays in PowerShell

There isn't convenient syntax in PowerShell for creating a multidimensional array, but the .NET style works just fine. For example, this creates a 5x3 two-dimensional array of integers:

$arr = [array]::CreateInstance([int], 5, 3)

The syntax for using these arrays is exactly what you would expect. This sets the element at both dimensions' first index:

$arr[0, 0] = 1

Interestingly, ranges (or collections in general) are not acceptable indexes for multidimensional arrays like they are for one-dimensional arrays.

Sunday, April 1, 2018

Keen Modding Live - Close confirmation fix

Abiathar Live Studio has to automate a lot of project opening and closing when setting up local copies of live levels. This works great if it's managing all projects involved in the shuffle, but I had not previously tested it when non-live projects are open. If a non-live project with unsaved changes is still up when a newly created or cloned live level is opened, the "save changes before closing?" dialog will open as normal, but trying to cancel will cause Abiathar to crash.

This happens because the Abiathar Live Studio extension doesn't check whether the vanilla project-opening method actually opened the project it wanted. So I added a bit of post-open validation and made the appropriate functions bail out if the open was canceled.