MarkDuplicates Picard - rna-seq

I am using Picard to mark only optical duplicates for which I read the manual of MarkDuplicates. My script looks like this
#!/usr/bin/bash
java -jar build/libs/picard.jar MarkDuplicates \
I=sorted.bam \
O=mark_opticalduplicate.bam \
MAX_OPTICAL_DUPLICATE_SET_SIZE=300000 \
TAGGING_POLICY=OpticalOnly \
M=markedoptical_dup_metrics.txt
I am not sure I am getting only optical duplicates when I am using the samtool flag 0x400
Any suggestions at this point is highly appreciated.

Related

Invalid argument from bash script on MacOS command line

I'm trying to run the LiteCart bash installer script located here:
https://github.com/litecart/installer/tree/master/cli
Unfortunately, it's giving me a problem when I add preset arguments like this:
--document_root=/var/www/litecart/public_html \
--db_server=localhost \
--db_user=johndoe \
--db_password=mycatsname \
--db_database=mylitecartdb \
--db_prefix=lc_ \
--timezone=Europe/London \
--admin_folder=admin \
--admin_user=admin \
--admin_password=mydogsname \
--development_type=standard
I keep getting:
Error: Invalid argument (--document_root=/var/www/litecart/public_html)
My computer is running MacOS 10.15 and the server is running CentOS 7.9. The script runs fine without the arguments.
I can't find anything that even resembles this situation here. What's the proper way to run a script like this? Thanks.
Script contains no case for --document_root.
Try:
export document_root="/var/www/litecart/public_html"
./install.sh --db_server=localhost \
--db_user=johndoe \
--db_password=mycatsname \
--db_database=mylitecartdb \
--db_prefix=lc_
I assume that there are more problems in the script.

Bash/WSL2: Is it possible to send files into the Windows directory from Linux?

#!/bin/bash
youtube-dl \
--ignore-errors \
--no-playlist \
--prefer-free-formats \
--no-call-home \
--extract-audio \
$1 \
--output 'C:\Users\Daniel\Music\Other\$2.%(ext)s'
Right now this script just puts the downloaded file into PWD, with that entire string as it's name. My question is:
Is it possible to use a Windows folder as a destination, or is this a limitation of WSL?
Help is appreciated.
in the wsl the default mount point for C: is /mnt/c/
so change the last line to:
"/mnt/c/Users/Daniel/Music/Other/$2.%(ext)s"
double quotes (see comment from #CharlesDuffy)

WEKA RandomForest model loading. Weka exception: No training file and no object input file given

I am currently using two shell scripts to train/test Random Forest model.
When I train the model I have no problems at all. However, when calling the test.sh which tries to load the model, generates the following error:
Weka exception: No training file and no object input file given.
General options:
-h or -help
Output help information.
-synopsis or -info
Output synopsis for classifier (use in conjunction with -h)
-t <name of training file>
Sets training file.
...
In train.sh I have:
java -Xmx1g -classpath $CLASSPATH:weka.jar weka.classifiers.trees.RandomForest \
-t "$FileNameFeaturesTrain_weka" \
-no-cv \
-I $numTrees -K $numFeat -S 0 \
-p 0 -distribution -d "$fileNameModel" > "$fname_output_pred"
In test.sh I have:
java -Xmx1g -classpath $CLASSPATH:weka.jar weka.classifiers.trees.RandomForest \
-l "$FileNameModel" \
-T "$FileNameFeaturesTest_weka" \
-no-cv \
-p 0 -distribution > "$fname_output_pred"
I don't understand why is the model not loading in my test.sh script. However the same logic and flags work well with weka.classifiers.functions.Logistic, weka.classifiers.functions.MultilayerPerceptron, etc. This error is only happening with RandomForest. I am using WEKA 3.6.12.
I would appreciate any tips or comments.
Thank you,

Vagrant keeps losing file doing provision

I'm running into an odd behavior on the latest version of vagrant in a Windows7/msys/Virtualbox environment setup, where after executing a vagrant up command I get an error with rsync; 'file has vanished: "/c/Users/spencerd/workspace/watcher/.LISTEN' doing the provisioning stage.
Since google, irc, and issue trackers have little to no documentation on this issue I wonder if anyone else ran into this and what would the fix be?
And for the record I have successfully build a box using the same vagrant file and provisioning script. For those that want to look, the project code is up at https://gist.github.com/denzuko/a6b7cce2eae636b0512d, with the debug log at gist.github.com/
After digging further into the directory structure and running into issues with git pushing code up I was able to find a non-existant file that needed to be removed after a reboot.
Thus, doing a reboot and a rm -rf -- "./.LISTEN\ \ \ \ \ 0\ \ \ \ \ \ 100\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ " did the trick.

How to transform an high def PDF to low def using command line tools?

I've a unix server (mac osx in fact) which transform actually PS files to PDF files. It does this through ps2pdf, with those parameters:
ps2pdf14 \
-dPDFSETTINGS=/prepress \
-dEPSCrop \
-dColorImageResolution=72 \
-dColorConversionStrategy=/LeaveColorUnchanged \
INPUT_FILE \
OUTPUT_FILE
But now I've to adapt this script to have a PDF file as input instead as PS.
So I guess that ps2pdf will not work anymore, and I need something which can reduce the quality of the pdf.
Do you know a tool like this?
The ps2pdf14 script just runs the ps2pdfwr script with -dCompatibilityLevel=1.4, which in turn uses gs with various parameters. You can examine that script to see the options.
You could run gs directly, putting in the various options added by the scripts and your own -d options (which are passed directly to gs). I.e. try:
gs \
-sDEVICE=pdfwrite \
-dPDFSETTINGS=/prepress \
-dEPSCrop \
-dColorImageResolution=72 \
-dColorConversionStrategy=/LeaveColorUnchanged \
-q \
-dNOPAUSE \
-dBATCH \
-sOutputFile=OUTPUT_FILE \
INPUT_FILE
Your command should works with PDFs: Ghostscript (backend for ps2pdf) accept PDF as input file. I just tested ps2pdf from Ghostscript 9.04 and it works

Resources