finding error in command line - command-line

I am trying to run some kind of programm using command line, but I got an error.
The command line is:
quantisnp2.exe --outdir D:\output\ --config "C:\Program files\QuantiSNP\params.dat" --levels "C:\Program files\QuantiSNP\levels.dat" --sampleid CNV1 --gender female --emiters 10 --Lsettings 2000000 --doXcorrect --genotypes --gcdir D:\gc\ --input-files C:\Program files\CNV1.txt
QuantiSNP:Single-file mode input find.
QuantiSNP:Processing file: C:|Program
QuantiSNP:Local CG content directory specified. Local CG content correction will be used.
??? Error using ==>textread at 167
File not found.
Error in ==> quantisnp2 at 293

The first thing I'd be looking at is the unquoted C:\Program files\CNV1.txt at the end of the command (all your other ones are quoted).
There's a good chance that's being treated as two arguments, C:\Program and files\CNV1.txt.
You may also want to check the spelling of emiters, I'm pretty certain the correct English word would be emitters though, of course, this could be a case of the QuantiSNP developers not knowing how to spell :-)

Related

Relative Path (pathlib) name working on MAC OS but on Windows gives me a error

Currently I am working a project that has have been using the pathlib library so I can work on my Windows desktop when I need too and on my MacBook Pro. Essentially be able to work between both operating systems. I have not have any issues at all until right now. Here is the set up:
I have a pipeline set up to automatically save a .joblib and a whole lot of .png files that will go to a directory called
output_dir = Path('../Trained_Models/Differential_gene_analysis/A Kidney Cancer Transcriptome Molecular Signature Identifies Tumors with Tumor Thrombus/Models train on TCGA data and test on Rodriguez data/Oct-XX-20XX')
For example, if I want to save a .joblib file under the name RandomForest_TumorThrombus_104.joblib,I would use the command
joblib.dump(model ,output_dir / 'RandomForest_TumorThrombus_104.joblib')
On my MacBook Pro, I have no issues when this is ran, but on Windows it gives me the following error
FileNotFoundError: [Errno 2] No such file or directory: '..\\Trained_Models\\Differential_gene_analysis\\A Kidney Cancer Transcriptome Molecular Signature Identifies Tumors with Tumor Thrombus\\Models train on TCGA data and test on Rodriguez data\\Oct-17-2022\\RandomForest_TumorThrombus_104.joblib'
I have tried to use the .resolve() method to get the absolute path but still gives me the same error. I have tried to experiment to try to see what is goin on such as using os.path.exists(). When using the os.path.exists() method I get True for the follwoing command:
os.path.exists(output_dir)
So it does indeed recognize that the directory exists. The next thing I tried was to rename the file to something like dddddd.joblib and that worked. But I find that only a few names for the file would allow me to save the files. During debug I found that the most recent Traceback occurs here:
with open(filename, 'wb') as f:```
I was wondering if anyone here had any idea what was going on here and how I can fix this issue? Please and Thank you.
The solution was to enable long paths on Windows.

How to resolve a "Metadata error: chr must be valid" error on Linux?

I am relatively new to the world of coding, so I am having trouble resolving an issue when running TranslocWrapper.pl tutorial_metadata.txt preprocess/ results/ --threads 2. I am trying to run the HTGTS Pipeline according to this GitHub project. This is the full error:
. Library Genome Chr Start End Strand
1 RAG1A_SRep2 hg19 chr11 36594878 36595030 -
Metadata error: chr must be valid at /home/micah/transloc_pipeline/bin/TranslocWrapper.pl line 285.
main::check_validity_of_metadata('HASH(0x2903ac8)') called at /home/micah/transloc_pipeline/bin/TranslocWrapper.pl line 248
main::read_in_meta_file() called at /home/micah/transloc_pipeline/bin/TranslocWrapper.pl line 90
I have already double-checked the successful installation of the Software Dependencies, so everything should be all good, but I am having trouble interpreting the "Metadata error: chr must be valid at ..." line. If it helps, these are the specific lines that are being called in the error:
TranslocWrapper.pl line 285:
croak "Metadata error: chr must be valid" unless grep { $_ eq $expt->{chr} } #chrlist;
TranslocWrapper.pl line 248:
check_validity_of_metadata($expt);
TranslocWrapper.pl line 90:
read_in_meta_file;
Thanks in advance for the help!
So the error is saying that one of the sequence characters in the metadata file is not present in the sequence's assembly file.
Given that this is the provided example you should assume that the data is correct and your invocation is faulty.
Have you done the TranslocPreprocess.pl preprocessing steps?
If you have try looking at the first line of the metadata file, identify the assembly entry. Ensure that the assembly file exists and that it contains the required sequence.
One common problem with this kind of code is the case of the filenames. The examples are designed to be run in Linux where filename case matters. Windows likes to pretend that case doesn't matter, this can cause problems. If you are running this code from Microsoft Windows or extracted any of the archives from within Windows this is a likely cause of the error.

jupyter notebook with unicode characters PDF converting problems

I was making a math class note with some unicode characters (Simplified Chinese, in my case) in it. And when I was trying to convert it into PDF file, it popped out 500 error. The error message reads:
...
*************************************************
("E:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec.sty"
("E:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec-xetex.sty"
("E:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("E:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\tuenc.def"))
("E:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg")
! Undefined control sequence.
<argument> \LaTeX3 error:
Erroneous variable \c__fontspec_shape_n_n_tl used!
l.3806 \emfontdeclare{ \emshape, \eminnershape }
?
! Emergency stop.
<argument> \LaTeX3 error:
Erroneous variable \c__fontspec_shape_n_n_tl used!
l.3806 \emfontdeclare{ \emshape, \eminnershape }
No pages of output.
Transcript written on notebook.log.
I guess the fontspec part went wrong, but I don't know how to solve it.
For your information, here is what I've done before I got the 500 error.
1.I've installed the pandoc, and I already have Miktex before;
2.I've changed the file
...\nbconvert\templates\latex\article.tplx
rewritten the article class to be ctexart;
3.I've changed the file
...\nbconvert\templates\latex\exporters\pdf.py
rewritten the latex command to be
latex_command = List([u"xelatex", u"{filename}"], config=True,
help="Shell command used to compile latex."
)
4.I've also tried this:"https://github.com/ipython/ipython/issues/7150", which tends to convert the ipynb file into latex file first, then into PDF. And this didn't work for me either. The main reason is that the config file can't be found by jupyter nbconvert command.
For your information, my OS is Win7 Ultimate x64, with Chrome for Anaconda3 jupyter notebook.
Thanks in advance for anyone who takes time to read my post. Any help would be appreciated.

Load all records that contain `sym value from splayed tables in directory

I have tables called; quotes, trades and sym saved as splayed tables in a directory called splay in my q directory. I cannot figure out how to load these tables using the methods identified on the code.kx.com website. When I check the file properties, it says file type is File, so I do not know what type of file to open after the filename. Once I have managed to load these files, I need to select all records that contain the symbol IBM (in the column sym of the tables). I have tried so far:
q)\cd splay
q)\l quotes
'quotes. OS reports: The system cannot find the file specified.
[0] (.Q.l)
q)\l trades
'trades. OS reports: The system cannot find the file specified.
[0] (.Q.l)
.Q )\l trades.q
'trades.q. OS reports: The system cannot find the file specified.
[2] (<load>)
))\l trades.dat
'trades.dat. OS reports: The system cannot find the file specified.
[4] (.Q.l)
to no avail. the same approach but for the directory itself.
q)\l splay
I have tried to just run the files without loading by being in the directory but this has also not been successful.
q)\cd splay
q)\cd
"C:\\Users\\Lewis\\splay"
q)t:get`:trades
'trades. OS reports: The system cannot find the file specified.
[0] t:get`:trades
^
q)q:get `:quotes
'quotes. OS reports: The system cannot find the file specified.
[0] q:get `:quotes
^
q)load`quotes
'quotes. OS reports: The system cannot find the file specified.
[0] load`quotes
^
One of the ways the code.kx.com website says to do this, and one of my first approaches:
C:\Users\Lewis\q>q/q.exe splay
KDB+ 3.5 2017.10.11 Copyright (C) 1993-2017 Kx Systems
w32/ 4()core . . .
Welcome to kdb+ 32bit edition
For support please see http://groups.google.com/d/forum/personal-kdbplus
Tutorials can be found at http://code.kx.com/q
To exit, type \\
To remove this startup msg, edit q.q
'/q.exe. OS reports: The system cannot find the file specified.
[0] (.Q.l)
.Q )
and the final approach I have had to load these files or directory is:
q)))load `splay
'splay. OS reports: Access is denied.
[6] load `splay
^
q))))\cd splay
q))))load `splay
'splay. OS reports: Access is denied.
[9] load `splay
^
Please, help me!
If you are in the directory /Users/Lewis you should be able to pass the splay as a command line parameter, like this: q splay. There may be an issue with the path you are using to your q application q\q.exe which is causing an error to flag up.
Alternatively you should be able to open it from inside an active q session like: \l splay provided you are in the directory /Users/Lewis OR like \l . if you are in the directory /Users/Lewis/splay, where . is a shortcut for the current directory.
Additionally you stated that you have the tables trade, quote and sym. It all depends how you saved the data to disk but the sym file should not be a table like the other two, which you should see when you load the data in.
The error OS reports: Access is denied. is probably due to the q process not having appropriate permissions to access the file. If you start the process with admin privileges you should be able to get around this error.

Algebra filter error in moodle

I installed moodle 1.9.12 and now I want to use Algebra notation in content. I enable "TeX Notation" and "Algebra Notation" in administrator panel and also install mimetext and dvips and Imagemagic on the server. fortunately Tex Notation works fine but I got the following error for Algebra:
sh: /var/www/html/moodle/filter/tex/mimetex.linux: not found
The shell command
"/var/www/html/moodle/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/algebra/de06d6c44d98ba4e42dffca988bf530b.gif" -- '\Large \frac{\sin\left(z\right)}{x^{2}+y^{2}}'
returned status = 127
File size of mimetex executable /var/www/html/moodle/filter/tex/mimetex.linux is 830675
The file permissions are: 100775
The md5 checksum of the file is 56bcc40de905ce92ebd7b083c76e019e
Image not found!
Note: /var/www/html/moodle/filter/tex/mimetex.linux exists on the server and is executable!!!
What is the problem?? Any idea?????
From what you have described, calling the general tex filter debug page works and does not show up the same error.
/filter/tex/texdebug.php works, but /filter/algebra/algebradebug.php does not.
If this is the case, perhaps you could check for an open_basedir, or safe_mode_exec_dir being set to include the current working directory, or otherwise restricting the execution of /var/www/html/moodle/filter/tex/mimetex.linux, while the current working directory is /var/www/html/moodle/filter/algebra.
You could look at this by visiting /admin/phpinfo.php at your site, and look carefully at the effective values of open_basedir, safe_mode and safe_mode_exec_dir.
You could also check the apache error log or add the following lines to the top of the algebra debug php file, and you might see some extra error messages:
$CFG->debug = 6143 ;
$CFG->debugdisplay= 1 ;
Hope that helps