How do I run burrows-wheeler aligner on windows subsystem for linux? - bash

Total newbie here and have no idea on what I'm doing.
I have installed ubuntu on windows can open bash from windows now.
I have also downloaded burrow-wheeler aligner from the Sourceforge: https://sourceforge.net/projects/bio-bwa/files/
From there I tried extracting the bz2 file. And I added the extracted folder into PATH
but when I type in bwa on bash, it says bwa: command not found
I'm a total beginner and want to get started with bioinformatics. I performed the aforementioned steps because that's how I setup conda to work on windows cmd.
What am I doing wrong?

In the subsystem, almost everything remains the same in your scenario just as an Ubuntu system, then you just follow the Readme file of this repository: lh3/bwa. Since the repo in Sourceforge seems to have been archived for a long time, you'd better use the newer alternative on Github.

Related

Is there a way to add Unix commands to GitKraken?

How can I use unix commands in Gitkraken?
So I've recently picked up coding again, going back to the basics, and when I was learning previously I used windows and installed Git Bash which uses a Unix command-line environment if I'm not mistaken. The Odin Project (the website I am learning to code from) does not support Windows as an operating system when learning to code due to various reasons listed on their website. I believe that Windows is adequate and would like to continue using it instead of using VMware or VirtualBox to 'install' Linux. The only issue I'm having is executing commands using GitKraken. Some of the commands are different, so I was just wondering if there is a way to use Unix commands in GitKraken? At this point, I am just curious if it is possible. I can continue to use Git Bash, however, GitKraken displaying a visual map of my repos is very helpful.
Ex. How to open a file
$ open ./index.html - macOS
$ start index.html - Windows OS
Any help would be appreciated.

installation pip install dbt-postgres

I guess just installed dbt-postgres according to the article https://docs.getdbt.com/dbt-cli/install/pip
using command pip install dbt-postgres
after the installation I have everywhere Requirements already satisfied
When I try the command to see the version I have an error
''dbt' is not recognized as an internal or external command,
operable program or batch file.'
Does this mean that I didn't downloaded this?
How to check the version?
pip is saying that you already have dbt-postgres installed ("Requirement already satisfied") in your local Python 3.10 environment.
Windows is complaining because that Python's site-packages directory is not on your PATH. This is typical; depending on how you install Python on Windows, it is not automatically added to your PATH. (PATH is an environment variable that tells your shell where to search for the commands you type in -- each command is the name of an executable file in a folder somewhere, and PATH is a list of folders to search in for those executable files).
There are a few ways to add Python to your PATH -- see the official docs on this subject. If you're new to all of this, your best bet might be to uninstall and re-install Python. The Windows Store is now the best way to do this.
HOWEVER there is another issue here too -- you're trying to run dbt on Python 3.10, but currently dbt only supports older versions of Python (3.7-3.9). So when you re-install Python, you're going to want to specify 3.9 (which I linked to above).
Managing multiple versions of Python on your machine can be a real pain, especially on Windows. If you have someone more experienced in your organization (like an engineer who knows Python well), it's well worth your time to get someone to pair with you on this while you work it out.

cygheap mismatch error in git for windows

Trying to run a shell script in Git Bash. This particular script requires the Rcpp and RcppArmadillo packages. (creating an R package implemented in C++) Because I am on a Windows system I had to install Rtools40. Upon execution of the sh command I get the error:
fatal error - cygheap base mismatch detected - 0x180316408/0x180317408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
What I've tried:
Following the instructions in the error message. However, a search for cygwin1.dll comes up empty. Additionally, I have never installed Cygwin on my machine.
Updating R, Rtools40, and Git for Windows to the latest versions. This was much needed (apparently Windows doesn't update these programs automatically sigh) but it did not resolve the error message.
Turning off ASLR protections in Windows Security settings as described in this post and this post.
Deleting duplicate msys-2.0.dll files from my drive. This ultimately worked. I will post the solution in detail as an answer to this question.
Hope this helps anyone who, like me, has been sifting through the many posts that don't fully answer this question.
So here's how I solved this problem. From what I understand, the error message in Git Bash is outdated and deceptive. It references Cygwin, but Git Bash actually uses MSYS2, not Cygwin. So instead of searching for cygwin1.dll, I needed to search my drive for msys-2.0.dll. This file was present in two locations: Git\usr\bin and rtools40\SOMETHING (I don't remember the exact path, but it was associated with Rtools40). As per the directions in the error message, I deleted the version that was older, which happened to be the one associated with Rtools40. That left only one version of msys-2.0.dll on my drive, and the sh command then executed in Git Bash with no issues.
What I'm still confused about: Why hasn't the error message in Git Bash been updated? What's the difference between Cygwin and MSYS2? I know they both impose the UNIX environment on Windows, but are there advantages or disadvantages to one or the other? In the long run, if I want to execute scripts through the command line, is Git Bash sustainable, or should I just create a Linux partition on my machine?
I came across a post on GitHub that mentioned that if you are running into this issue after getting a "Resource temporarily unavailable" error, then the issue is likely that you are running 32-bit version of Git. Install Git 64 bit, and your issue should go away

"Failed loading ClientOU certificate at ..." while running a Hyperledger Fabric sample "Building Your First Network"

I'm trying to test my development environment and keep getting this error while going through the "Building Your First Network". I've installed the prerequisites on a Windows 10 Home edition so I'm using Docker Toolbox. The error is described as follows and happens just after a execute the ./byfn.sh up -l node command:
2019-11-14 17:06:26.982 UTC [msp] loadCertificateAt -> INFO 002 Failed loading ClientOU certificate at [/var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem]: [could not read file /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: open /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: no such file or directory]
As you can see there is a backslash just before the ca.example.com-cer.pem which I think is causing the problem. Anyone have an idea of how I might solve this issue?
Docker Toolbox for windows doesn't provide a great experience for users. It's limited in how it can share windows directories with linux containers running in the linux VM it creates. I believe it can be made to work but you have to use very specific folders in your home directory and you would have to google it to find all the details but it's a lot more of a hassle.
You have other options of course
Upgrade to Windows Pro and use Docker for Windows (which doesn't have the same sharing limitations, but still not a great experience and you can still encounter problems sharing the directories)
Install a hypervisor such as virtualbox and run a linux desktop distribution such as ubuntu or mint and use that instead (which I would recommend and would suggest ubuntu 18.04 mate edition)
Wait until next year when hopefully microsoft will release WSL2 for everyone (including home edition) and then Docker won't need a linux VM running and it should be a much better experience trying to run linux containers on windows.
As mentioned by lindluni here
Backslash problem in Hyperledger 2.0.1 when orderer/peer look for .pem files
the problem arises when one creates crypto artifacts under Windows since "golang filepath.Join uses the current OS's filepath scheme". Hence, under Windows backslash is used in all the generated config.yaml files found in crypto-config/*. One can replace this backslashes before the deployment to fix the issue.

Node.js - tutorials on getting it to work with Cygwin on a Vista machine

All,
Am trying to get Node.js to work on Vista machine.
I installed Cygwin (as per the Github instructions) which appears to have been installed correctly. However, none of the commands are executing.
Are there any tutorials for the stages after the Cygwin installation?
PROBLEM: When any command is executed, I get 'Bash: command not found' error.
Not even command like 'c:\cygwin\bin' is executing.
When I type 'user' in cygwin command prompt, I get 'ntvdm has encountered an system error. Parameter incorrect'.
I thought the above error may be due to the firewall, disabling the firewall did not have any effect, running the program with admin rights also did not change the results...
Am confused and would love to get some guidance on what steps to go with next on getting Node.js up and running on a Windows Vista machine.
Many thanks,
UPDATE1:
We managed to make a bit more progress. It appears that we had not installed all the relevant files related to Cygwin. Upon re-download and reinstalled, it ran well, however, we have driven into another error. Error we get:
How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).
We followed the instructions as per the above thread (3rd post from top for Windows machines), however, we are still stuck at the same error.
Any guidance please?
Have you tried just using the Windows self contained binaries? http://node-js.prcn.co.cc/ This way you actually don't need to bother with Cygwin.
At first, i tried it your way too, using Cygwin. After smashing my head for the 10th time against a wall i just stopped trying and found a much cleaner solution.
I'm using VirtualBox running a Debain guest system to locally develop on my Windows 7 machine. Using VirtualBox, you can easily set up shared folders or port forwarding for node apps between your Windows machine and your Debian guest system.
Since you are using a plain Linux-system, all the compiling-pain is blown away.
If you plan to run node.js in production on a windows system: don't. I hardly believe node.js will be ever stable enough on windows-based systems using MINGW/Cygwin...
People seem to run into problems with Cygwin because they think that they are using a Windows machine.
If you install Cygwin, and open a bash shell prompt using the Cygwin icon, you are now in a UNIX environment and everything works the same as it would on UNIX. That includes building node.js.
I think you added some info to the question and I can see your problem. Yes, normally on Cygwin it has been possible to build node.js just as you would on any UNIX system, but that is no longer possible on Windows 7. Before running ./configure you have to:
Close all cygwin apps.
Double-click on C:\Cygwin\bin\ash.exe
Run ./rebaseall and when it completes, run ./perlrebase.
exit from the ash shell window.
At this point Cygwin will be back to normal and you can ./configure and make install.

Resources