Problem with extracting BioPerl-1.6.1.tar.gz when running VEP's INSTALL.pl script - linux

I'm trying to install version 77 of Variant Effect Predictor (VEP) on a linux machine and keep encountering errors when running perl INSTALL.pl. After resolving an error with missing the perl module Archive::Extract, I ran into this error:
Hello! This installer is configured to install v77 of the Ensembl API for use by the VEP.
It will not affect any existing installations of the Ensembl API that you may have.
It will also download and install cache files from Ensembl's FTP server.
Checking for installed versions of the Ensembl API...done
Setting up directories
Downloading required files
- fetching ensembl
** GET https://github.com/Ensembl/ensembl/archive/release/77.zip ==> 501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
** GET https://github.com/Ensembl/ensembl/archive/release/77.zip ==> 501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
Trying to fetch using curl
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 124 0 124 0 0 730 0 --:--:-- --:--:-- --:--:-- 729
100 10.7M 0 10.7M 0 0 3535k 0 --:--:-- 0:00:03 --:--:-- 4859k
- unpacking ./Bio/tmp/ensembl.zip
- moving files
- fetching ensembl-variation
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 134 0 134 0 0 737 0 --:--:-- --:--:-- --:--:-- 740
100 3986k 0 3986k 0 0 4378k 0 --:--:-- --:--:-- --:--:-- 7182k
- unpacking ./Bio/tmp/ensembl-variation.zip
- moving files
- fetching ensembl-funcgen
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 132 0 132 0 0 798 0 --:--:-- --:--:-- --:--:-- 800
100 2016k 0 2016k 0 0 3354k 0 --:--:-- --:--:-- --:--:-- 5156k
- unpacking ./Bio/tmp/ensembl-funcgen.zip
- moving files
- fetching BioPerl
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 100 178 0 0 2695 0 --:--:-- --:--:-- --:--:-- 2738
100 9340 100 9340 0 0 46698 0 --:--:-- --:--:-- --:--:-- 46698
- unpacking ./Bio/tmp/BioPerl-1.6.1.tar.gz
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Invalid header block at offset unknown at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 893.
Unable to extract '/opt/vep/src/ensembl-vep/ensembl-tools-release-77/scripts/variant_effect_predictor/Bio/tmp/BioPerl-1.6.1.tar.gz': Invalid header block at offset unknown at INSTALL.pl line 905.
Error listing contents of archive '/opt/vep/src/ensembl-vep/ensembl-tools-release-77/scripts/variant_effect_predictor/Bio/tmp/BioPerl-1.6.1.tar.gz': /bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
/bin/tar: Exiting with failure status due to previous errors
at INSTALL.pl line 905.
Extract failed due to errors at INSTALL.pl line 905.
Can't call method "error" on an undefined value at INSTALL.pl line 905.
And line 905 of the INSTALL.pl script is:
900 # unpack a tarball
901 sub unpack_arch {
902 my ($arch_file, $dir) = #_;
903
904 my $ar = Archive::Extract->new(archive => $arch_file);
905 my $ok = $ar->extract(to => $dir) or die $ae->error;
906 unlink($arch_file);
907 }
I'm not familiar enough with perl to know what's going wrong exactly, but I tried un-taring the BioPerl-1.6.1.tar.gz myself with tar -xvzf and that did not work. How can I resolve this issue?

this archive seems corrupted : /opt/vep/src/ensembl-vep/ensembl-tools-release-77/scripts/variant_effect_predictor/Bio/tmp/BioPerl-1.6.1.tar.gz
/bin/tar is giving you an error "/bin/tar: This does not look like a tar archive"
can you replace this file or delete it and restart the installation?

Related

PocketSphinx runtime error in log file

I am working on PocketSphinx. While running it, it shows some error in a log file. I can't understand them; what do they mean? Here are the errors:
{ ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/eight ignored
16 0
INFO: cmn.c(133): CMN: 1736.53 3228.30 -899.98 2679.72 -1582.93 -1126.47 -1513.65 -335.25 -1766.16 3463.14 2127.38 -979.71 2194.59
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/five', does not match id in the control file, 'five'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/five ignored
utt> 1 five 140 0 20 0
INFO: cmn.c(133): CMN: -798.98 2317.53 -5785.50 5469.77 -6605.24 -5970.96 -792.98 1046.92 -622.59 -6760.83 -853.49 -653.04 6555.86
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/four', does not match id in the control file, 'four'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/four ignored
utt> 2 four 77 0 20 0
INFO: cmn.c(133): CMN: 2708.64 -2833.31 4465.99 -2474.95 4256.10 -3710.75 1517.68 -3744.27 217.52 -3049.00 4280.67 3826.02 313.39
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/nine', does not match id in the control file, 'nine'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/nine ignored
utt> 3 nine 117 0 20 0
INFO: cmn.c(133): CMN: 4367.13 534.72 1667.75 -2840.18 2580.05 2861.98 2442.50 4493.30 2685.47 2841.25 -2529.57 -2752.00 -1507.38
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/one', does not match id in the control file, 'one'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/one ignored
utt> 4 one 110 0 20 0
INFO: cmn.c(133): CMN: -3718.15 -127.92 -3321.35 -1311.25 -1532.32 -1533.98 3016.80 -430.44 -1817.81 -1350.10 -1727.87 -2011.16 2224.16
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/seven', does not match id in the control file, 'seven'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/seven ignored
utt> 5 seven 122 0 28 0
INFO: cmn.c(133): CMN: -5035.38 -5103.44 -3878.29 -5700.23 -5596.67 -5654.61 -4015.24 -98.45 -5181.37 1043.58 54.60 5486.20 5289.32
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/six', does not match id in the control file, 'six'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/six ignored
utt> 6 six 91 0 24 0
INFO: cmn.c(133): CMN: -387.01 -1261.31 -2724.07 -890.98 2247.32 3631.96 1860.44 -129.39 2424.72 4224.40 -2736.33 2732.74 -2814.56
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/ten', does not match id in the control file, 'ten'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/ten ignored
utt> 7 ten 108 0 20 0
INFO: cmn.c(133): CMN: -1375.65 -3763.73 159.53 -2580.91 3806.55 -3326.88 -3192.88 2013.50 -3951.76 -2264.89 -3697.22 330.14 -4154.19
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/three', does not match id in the control file, 'three'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/three ignored
utt> 8 three 123 0 20 0
INFO: cmn.c(133): CMN: -660.11 -3743.96 697.49 242.08 -1517.09 -1629.75 6370.77 563.54 5316.62 2227.69 221.45 -547.87 -5667.59
WARN: "corpus.c", line 1481: Utterance id in the transcription file, 'male1/two', does not match id in the control file, 'two'.
ERROR: "forward.c", line 594: All 2 active states, 36 37, zero at time 1
ERROR: "baum_welch.c", line 324: male1/two ignored
}
The error means input audio has wrong format. It has to be 16khz 16bit mono PCM WAV file.

Opencv_createsamples fails with segmentation fault

I am currently trying to make a HAAR classifier. I have made an annotation file and have done everything as described in the official openCV tutorial: https://docs.opencv.org/3.3.0/dc/d88/tutorial_traincascade.html .
However, when I try to create the samples with opencv_createsamples, I get an error. My command:
opencv_createsamples -vec /some_dirs/samples/samples.vec -info /some_dirs/annotations/annotations.dat -w 8 -h 8 -num 100
The error:
Info file name: /home/nikifaets/code/pointsProcessing/annotations/annotations.dat
Img file name: (NULL)
Vec file name: /home/nikifaets/code/pointsProcessing/samples/samples.vec
BG file name: (NULL)
Num: 100
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 8
Height: 8
Max Scale: -1
RNG Seed: 12345
Create training samples from images collection...
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /build/opencv/src/opencv-3.4.0/modules/imgproc/src/resize.cpp, line 4044
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv/src/opencv-3.4.0/modules/imgproc/src/resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize
Aborted (core dumped)
However, if I try to do only two samples (no idea why exactly 2...), it runs and creates the .vec file, although my dataset includes about 300-400 pictures.
Pastebin of annotations.dat
Thank you in advance for the support!
Solved! Thank to Micka for suggesting a solution and being right. There was an error in the annotations file. One of the descriptions of a point of interest was 0 0 0 0 which is invalid. Always check your files carefully!

OpenCV Error: Assertion failed (_img.rows * _img.cols == vecSize)

I keep getting this error
OpenCV Error: Assertion failed (_img.rows * _img.cols == vecSize) in get, file /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/apps/traincascade/imagestorage.cpp, line 157
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/apps/traincascade/imagestorage.cpp:157: error: (-215) _img.rows * _img.cols == vecSize in function get
Aborted (core dumped)
when running opencv_traincascade. I run with these arguments: opencv_traincascade -data data -vec positives.vec -bg bg.txt -numPos 1600 -numNeg 800 -numStages 10 -w 20 -h 20.
My project build is as follows:
workspace
|__bg.txt
|__data/ # where I plan to put cascade
|__info/
|__ # all samples
|__info.lst
|__jersey5050.jpg
|__neg/
|__ # neg images
|__opencv/
|__positives.vec
before I ran opencv_createsamples -img jersey5050.jpg -bg bg.txt -info info/info.lst -maxxangle 0.5 - maxyangle 0.5 -maxzangle 0.5 -num 1800
Not quite sure why I'm getting this error. The images are all converted to greyscale as well. The neg's are sized at 100x100 and jersey5050.jpg is sized at 50x50. I saw someone had a the same error on the OpenCV forums and someone suggested deleting the backup .xml files that are created b OpenCV in case the training is "interrupted". I deleted those and nothing. Please help! I'm using python 3 on mac. I'm also running these commands on an ubuntu server from digitalocean with 2GB of ram but I don't think that's part of the problem.
EDIT
Forgot to mention, after the opencv_createsamples command, i then ran opencv_createsamples -info info/info.lst -num 1800 -w 20 -h20 -vec positives.vec
I solved it haha. Even though I specified in the command the width and height to be 20x20, it changed it to 20x24. So the opencv_traincascade command was throwing an error. Once I changed the width and height arguments in the opencv_traincascade command it worked.
This error is observed when the parameters passed is not matching with the vec file generated, as rightly put by the terminal in this line
Assertion failed (_img.rows * _img.cols == vecSize)
opencv_createsamples displays the parameters passed to it for training. Please verify of the parameters used for creating samples are the same that you passed. I have attached the terminal log for reference.
mayank#mayank-Aspire-A515-51G:~/programs/opencv/CSS/homework/HAAR_classifier/dataset$ opencv_createsamples -info pos.txt -num 235 -w 40 -h 40 -vec positives_test.vec
Info file name: pos.txt
Img file name: (NULL)
Vec file name: positives_test.vec
BG file name: (NULL)
Num: 235
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 40 <--- confirm
Height: 40 <--- confirm
Max Scale: -1
RNG Seed: 12345
Create training samples from images collection...
Done. Created 235 samples

Cloudfront to use different Content-Type for compressed and uncompressed files

I am serving a website generated by a static site generator via S3 and Cloudfront. The files are being uploaded to S3 with correct Content-Types. The DNS points to Cloudfront which uses the S3 bucket as its origin. Cloudfront takes care about encryption and compression. I told Cloudfront to compress objects automatically. That worked fine until I decided to change some of the used images from PNG to SVG.
Whenever a file is requested as uncompressed it is delivered as is with the set Content-Type (image/svg+xml) and the site is rendered correctly. However, if the file is requested as compressed it is delivered with the default Content-Type (application/octet-stream) and the image is missing in the rendering. If I then right-click on the image and choose to open the image in a new tab, it will be shown correctly (without the rest of the page).
The result is the same independent of the used browser. In Firefox I know how to set it to force requesting compressed or uncompressed pages. I also tried curl to check the headers. These are the results:
λ curl --compressed -v -o /dev/null http://dev.example.com/img/logo-6998bdf68c.svg
* STATE: INIT => CONNECT handle 0x20049798; line 1090 (connection #-5000)
* Added connection 0. The cache now contains 1 members
* Trying 52.222.157.200...
* STATE: CONNECT => WAITCONNECT handle 0x20049798; line 1143 (connection #0)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to dev.example.com (52.222.157.200) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x20049798; line 1240 (connection #0)
* STATE: SENDPROTOCONNECT => DO handle 0x20049798; line 1258 (connection #0)
> GET /img/logo-6998bdf68c.svg HTTP/1.1
> Host: dev.example.com
> User-Agent: curl/7.44.0
> Accept: */*
> Accept-Encoding: deflate, gzip
>
* STATE: DO => DO_DONE handle 0x20049798; line 1337 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x20049798; line 1464 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x20049798; line 1474 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream
< Content-Length: 7468
< Connection: keep-alive
< Date: Wed, 01 Mar 2017 13:31:33 GMT
< x-amz-meta-cb-modifiedtime: Wed, 01 Mar 2017 13:28:26 GMT
< Last-Modified: Wed, 01 Mar 2017 13:30:24 GMT
< ETag: "6998bdf68c8812d193dd799c644abfb6"
* Server AmazonS3 is not blacklisted
< Server: AmazonS3
< X-Cache: RefreshHit from cloudfront
< Via: 1.1 36c13eeffcddf77ad33d7874b28e6168.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: jT86EeNn2vFYAU2Jagj_aDx6qQUBXFqiDhlcdfxLKrj5bCdAKBIbXQ==
<
{ [7468 bytes data]
* STATE: PERFORM => DONE handle 0x20049798; line 1632 (connection #0)
* Curl_done
100 7468 100 7468 0 0 44526 0 --:--:-- --:--:-- --:--:-- 48493
* Connection #0 to host dev.example.com left intact
* Expire cleared
and for uncompressed it looks better:
λ curl -v -o /dev/null http://dev.example.com/img/logo-6998bdf68c.svg
* STATE: INIT => CONNECT handle 0x20049798; line 1090 (connection #-5000)
* Added connection 0. The cache now contains 1 members
* Trying 52.222.157.203...
* STATE: CONNECT => WAITCONNECT handle 0x20049798; line 1143 (connection #0)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to dev.example.com (52.222.157.203) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x20049798; line 1240 (connection #0)
* STATE: SENDPROTOCONNECT => DO handle 0x20049798; line 1258 (connection #0)
> GET /img/logo-6998bdf68c.svg HTTP/1.1
> Host: dev.example.com
> User-Agent: curl/7.44.0
> Accept: */*
>
* STATE: DO => DO_DONE handle 0x20049798; line 1337 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x20049798; line 1464 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x20049798; line 1474 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Content-Type: image/svg+xml
< Content-Length: 7468
< Connection: keep-alive
< Date: Wed, 01 Mar 2017 20:56:11 GMT
< x-amz-meta-cb-modifiedtime: Wed, 01 Mar 2017 20:39:17 GMT
< Last-Modified: Wed, 01 Mar 2017 20:41:13 GMT
< ETag: "6998bdf68c8812d193dd799c644abfb6"
* Server AmazonS3 is not blacklisted
< Server: AmazonS3
< Vary: Accept-Encoding
< X-Cache: RefreshHit from cloudfront
< Via: 1.1 ac27d939fa02703c4b28926f53f95083.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: AlodMvGOKIoNb8zm5OuS7x_8TquQXzAAXg05efSMdIKgrPhwEPv4kA==
<
{ [2422 bytes data]
* STATE: PERFORM => DONE handle 0x20049798; line 1632 (connection #0)
* Curl_done
100 7468 100 7468 0 0 27667 0 --:--:-- --:--:-- --:--:-- 33639
* Connection #0 to host dev.example.com left intact
I don't want to switch off the compression for performance reasons. And it looks that this only happens for SVG file types. All other types have the correct, ie. the same Content-Type. I already tried to invalidate the cache and even switched it off completely by setting the cache time to 0 seconds. I cannot upload a compressed version when uploading to S3 because the upload process is automated and cannot easily be changed for a single file.
I hope that I did something wrong because that would be easiest to be fixed. But I have no clue what could be wrong with the setting. I already used Google to find someone having a similar issue, but it looks like it's only me. Anyone, who has an idea?
You're misdiagnosing the problem. CloudFront doesn't change the Content-Type.
CloudFront, however, does cache different versions of the same object, based on variations in the request.
If you notice, your Last-Modified times on these objects are different. You originally had the content-type set wrong in S3. You subsequently fixed that, but CloudFront doesn't realize the metadata has changed, since the ETag didn't change, so you're getting erroneous RefreshHit responses. It's serving the older version on requests that advertise gzip encoding support. If the actual payload of the object had changed, CloudFront would have likely already updated its cache.
Do an invalidation to purge the cache and within a few minutes, this issue should go away.
I was able to solve it by forcing the MIME type to "image/svg+xml" instead of "binary/octet-stream" which was selected after syncing the files with python boto3.
When you right click on an svg in a S3 bucket you can check the mimetype by viewing the metadata:
I'm not sure if this was caused by the python sync, or by some weirdness in S3/Cloudfront. I have to add that just a cache invalidation didn't work after that. I had to re-upload my files with the correct mimetype to get cloudfront access to the svg working ok.

Can't get code from bbc basic working

440 DEFPROCsave
450 phonenos=OPENUP("Phonenos")
470 PRINT
480 FOR j= 1 TO counter
490 PRINT#phonenos,contact{(j)}.name$,contact{(j)}.phone$,contact{(j)}.email$
500 FOR f = 1 TO 10
510 PRINT#phonenos,contact{(j)}.response%(1,f)
520 NEXT f
530
540 NEXT j
550 CLOSE#phonenos
560 PRINT "Data saved."
570 ENDPROC
Code to save details from database I'm trying to save what i have entered to a file but the error INVALID CHANNEL AT LINE 490 APPEARS/
If your error is on line 490, one of two things is likely happening.
Your FILEHANDLE for phonenos did not open.
You could be attempting to access the file from a bad location, it may not exist, or it could be write protected.
Your contact array is referencing an invalid index item.
Is counter going outside the range of the array? Is this a zero (0) or one (1) based array?

Resources