Create a bucket
Upload read files and genome index to bucket using the gcloud CLI sdk if your files are stored locally
Create a VM with your compute needs
Connect to the VM from terminal
gcloud compute ssh --project=<project> --zone=<zone> <instance name>
Transfer reads and genome index to VM using gcloud
gcloud storage cp --recursive gs://BUCKET_NAME/OBJECT_NAME SAVE_TO_VM_LOCATION
Meanwhile, download the STAR aligner to your VM
Download binaries using instructions on Github: https://github.com/alexdobin/STAR
wget <https://github.com/alexdobin/STAR/archive/2.7.11b.tar.gz>
tar -xzf 2.7.11b.tar.gz
cd STAR-2.7.11b
Add STAR to path
echo "export PATH=$PATH:/home/timon/STAR-2.7.11b/bin/Linux_x86_64_static" >> ~/.bashrc
source ~/.bashrc
STAR
Install libgomp1
sudo apt-get install libgomp1
Align reads using
STAR --runThreadN 8 \\
--runMode alignReads \\
--genomeDir genome-index/ \\
--readFilesIn SRR22875020/SRR22875020_1.fastq \\
--outWigType wiggle \\
--outSAMtype BAM SortedByCoordinate \\
--limitBAMsortRAM 1174874044
EXITING because of FATAL ERROR: could not open genome file genome-index//genomeParameters.txt
SOLUTION: check that the path to genome files, specified in --genomeDir is correct and the files are present, and have user read permsissions
Apr 17 11:11:39 ...... FATAL ERROR, exiting