Unable to make Opencv 2.4.9 Ubuntu 14.10 - opencv
I have tried to make OpenVC following the instructions on their website:
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
unzip opencv-2.4.10.zip
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DENABLE_AVX=ON \
-DENABLE_FAST_MATH=ON \
-DENABLE_SSE=ON \
-DENABLE_SSE2=ON \
-DENABLE_SSE3=ON \
-DENABLE_SSE41=ON \
-DENABLE_SSE42=ON \
-DENABLE_SSSE3=ON \
/absolute/path/to/opencv-2.4.10
make -j7
It eventually fails with the following output:
8:7: error: ‘CODEC_ID_H263P’ was not declared in this scope
{ CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:120:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:121:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:122:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:123:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:124:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:125:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:126:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:129:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:130:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:131:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:132:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:133:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('W', 'V', '1', 'F') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:134:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('S', 'E', 'D', 'G') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:136:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope
{ CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:138:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') }, /* default signature when using MSMPEG4 */
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:139:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:142:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:143:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:144:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:145:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:146:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:147:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:148:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope
{ CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:150:7: error: ‘CODEC_ID_MSMPEG4V2’ was not declared in this scope
{ CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:153:7: error: ‘CODEC_ID_MSMPEG4V2’ was not declared in this scope
{ CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:155:7: error: ‘CODEC_ID_MSMPEG4V1’ was not declared in this scope
{ CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:157:7: error: ‘CODEC_ID_WMV1’ was not declared in this scope
{ CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:160:7: error: ‘CODEC_ID_WMV2’ was not declared in this scope
{ CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:161:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:162:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'd') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:163:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:164:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', '2', '5') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:165:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:166:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:167:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:168:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('M', 'P', 'E', 'G') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:169:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('P', 'I', 'M', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:170:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, MKTAG('V', 'C', 'R', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:171:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG1VIDEO, 0x10000001 },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:172:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, 0x10000002 },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:173:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:174:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope
{ CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:175:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:176:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:177:7: error: ‘CODEC_ID_LJPEG’ was not declared in this scope
{ CODEC_ID_LJPEG, MKTAG('L', 'J', 'P', 'G') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:178:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('J', 'P', 'G', 'L') }, /* Pegasus lossless JPEG */
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:179:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - decoder */
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:180:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:181:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('I', 'J', 'P', 'G') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:182:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope
{ CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:183:7: error: ‘CODEC_ID_HUFFYUV’ was not declared in this scope
{ CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:184:7: error: ‘CODEC_ID_FFVHUFF’ was not declared in this scope
{ CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:185:7: error: ‘CODEC_ID_CYUV’ was not declared in this scope
{ CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:186:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, 0 },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:187:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:188:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:189:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:190:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:191:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:192:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:193:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:194:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope
{ CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:195:7: error: ‘CODEC_ID_INDEO3’ was not declared in this scope
{ CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:196:7: error: ‘CODEC_ID_INDEO3’ was not declared in this scope
{ CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:197:7: error: ‘CODEC_ID_VP3’ was not declared in this scope
{ CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:198:7: error: ‘CODEC_ID_VP3’ was not declared in this scope
{ CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:199:7: error: ‘CODEC_ID_ASV1’ was not declared in this scope
{ CODEC_ID_ASV1, MKTAG('A', 'S', 'V', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:200:7: error: ‘CODEC_ID_ASV2’ was not declared in this scope
{ CODEC_ID_ASV2, MKTAG('A', 'S', 'V', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:201:7: error: ‘CODEC_ID_VCR1’ was not declared in this scope
{ CODEC_ID_VCR1, MKTAG('V', 'C', 'R', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:202:7: error: ‘CODEC_ID_FFV1’ was not declared in this scope
{ CODEC_ID_FFV1, MKTAG('F', 'F', 'V', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:203:7: error: ‘CODEC_ID_XAN_WC4’ was not declared in this scope
{ CODEC_ID_XAN_WC4, MKTAG('X', 'x', 'a', 'n') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:204:7: error: ‘CODEC_ID_MSRLE’ was not declared in this scope
{ CODEC_ID_MSRLE, MKTAG('m', 'r', 'l', 'e') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:205:7: error: ‘CODEC_ID_MSRLE’ was not declared in this scope
{ CODEC_ID_MSRLE, MKTAG(0x1, 0x0, 0x0, 0x0) },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:206:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('M', 'S', 'V', 'C') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:207:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('m', 's', 'v', 'c') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:208:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('C', 'R', 'A', 'M') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:209:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('c', 'r', 'a', 'm') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:210:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('W', 'H', 'A', 'M') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:211:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope
{ CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:212:7: error: ‘CODEC_ID_CINEPAK’ was not declared in this scope
{ CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:213:7: error: ‘CODEC_ID_TRUEMOTION1’ was not declared in this scope
{ CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:214:7: error: ‘CODEC_ID_MSZH’ was not declared in this scope
{ CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:215:7: error: ‘CODEC_ID_ZLIB’ was not declared in this scope
{ CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:216:7: error: ‘CODEC_ID_SNOW’ was not declared in this scope
{ CODEC_ID_SNOW, MKTAG('S', 'N', 'O', 'W') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:217:7: error: ‘CODEC_ID_4XM’ was not declared in this scope
{ CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:218:7: error: ‘CODEC_ID_FLV1’ was not declared in this scope
{ CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:219:7: error: ‘CODEC_ID_SVQ1’ was not declared in this scope
{ CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:220:7: error: ‘CODEC_ID_TSCC’ was not declared in this scope
{ CODEC_ID_TSCC, MKTAG('t', 's', 'c', 'c') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:221:7: error: ‘CODEC_ID_ULTI’ was not declared in this scope
{ CODEC_ID_ULTI, MKTAG('U', 'L', 'T', 'I') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:222:7: error: ‘CODEC_ID_VIXL’ was not declared in this scope
{ CODEC_ID_VIXL, MKTAG('V', 'I', 'X', 'L') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:223:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope
{ CODEC_ID_QPEG, MKTAG('Q', 'P', 'E', 'G') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:224:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope
{ CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:225:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope
{ CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:226:7: error: ‘CODEC_ID_WMV3’ was not declared in this scope
{ CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:227:7: error: ‘CODEC_ID_LOCO’ was not declared in this scope
{ CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:228:7: error: ‘CODEC_ID_THEORA’ was not declared in this scope
{ CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:230:7: error: ‘CODEC_ID_WNV1’ was not declared in this scope
{ CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:231:7: error: ‘CODEC_ID_AASC’ was not declared in this scope
{ CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:232:7: error: ‘CODEC_ID_INDEO2’ was not declared in this scope
{ CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:233:7: error: ‘CODEC_ID_FRAPS’ was not declared in this scope
{ CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:234:7: error: ‘CODEC_ID_TRUEMOTION2’ was not declared in this scope
{ CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:237:7: error: ‘CODEC_ID_FLASHSV’ was not declared in this scope
{ CODEC_ID_FLASHSV, MKTAG('F', 'S', 'V', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:238:7: error: ‘CODEC_ID_JPEGLS’ was not declared in this scope
{ CODEC_ID_JPEGLS,MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - encoder */
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:239:7: error: ‘CODEC_ID_VC1’ was not declared in this scope
{ CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:240:7: error: ‘CODEC_ID_VC1’ was not declared in this scope
{ CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:241:7: error: ‘CODEC_ID_CSCD’ was not declared in this scope
{ CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:242:7: error: ‘CODEC_ID_ZMBV’ was not declared in this scope
{ CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:243:7: error: ‘CODEC_ID_KMVC’ was not declared in this scope
{ CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:246:7: error: ‘CODEC_ID_VP5’ was not declared in this scope
{ CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:247:7: error: ‘CODEC_ID_VP6’ was not declared in this scope
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:248:7: error: ‘CODEC_ID_VP6’ was not declared in this scope
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:249:7: error: ‘CODEC_ID_VP6’ was not declared in this scope
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:250:7: error: ‘CODEC_ID_VP6F’ was not declared in this scope
{ CODEC_ID_VP6F, MKTAG('V', 'P', '6', 'F') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:251:7: error: ‘CODEC_ID_JPEG2000’ was not declared in this scope
{ CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:252:7: error: ‘CODEC_ID_VMNC’ was not declared in this scope
{ CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:256:7: error: ‘CODEC_ID_TARGA’ was not declared in this scope
{ CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') },
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/ffmpeg_codecs.hpp:258:7: error: ‘CODEC_ID_NONE’ was not declared in this scope
{ CODEC_ID_NONE, 0 },
^
In file included from /home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::getProperty(int)’:
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg_impl.hpp:773:33: error: ‘AVStream’ has no member named ‘r_frame_rate’
return av_q2d(video_st->r_frame_rate);
^
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::get_fps()’:
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg_impl.hpp:820:49: error: ‘AVStream’ has no member named ‘r_frame_rate’
double fps = r2d(ic->streams[video_stream]->r_frame_rate);
^
In file included from /home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg_impl.hpp: In function ‘int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)’:
/home/antoniopedro/opencv-2.4.9/modules/highgui/src/cap_ffmpeg_impl.hpp:1236:72: error: ‘avcodec_encode_video’ was not declared in this scope
out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
^
modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:122: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o' failed
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1
CMakeFiles/Makefile2:1724: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2
How can I identify the issue with the build process?
FFMPEG is depricated, and most likely not installed on your Ubuntu 14.04 Distro.
Try building with the WITH_FFMPEG=OFF Flag.
eg:
cmake -DCMAKE_BUILD_TYPE=Release \
-DENABLE_AVX=ON \
-DENABLE_FAST_MATH=ON \
-DENABLE_SSE=ON \
-DENABLE_SSE2=ON \
-DENABLE_SSE3=ON \
-DENABLE_SSE41=ON \
-DENABLE_SSE42=ON \
-DENABLE_SSSE3=ON \
-DWITH_FFMPEG=OFF \
/absolute/path/to/opencv-2.4.10
Thanks to OP for the answer.
According to opencv.org FFMPEG or Libav is still necessary.
Try to compile FFMPEG from source with this:
Install x264:
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjvf last_x264.tar.bz2
cd x264-snapshot*
./configure --enable-shared --enable-pic
make
As root:
sudo su
make install
ldconfig -v
And then FFMPEG:
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
./configure --extra-libs="-ldl" --enable-gpl --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-x11grab --enable-shared --enable-pic
make
As root:
su
make install
ldconfig -v
It's a good idea take a look at http://www.javieriparraguirre.net/installing-opencv-debian, is for debian but will also be useful for Ubuntu.
EDITION:
ffmpeg is deprecated. Currently you can compile following the opencv3 official instructions here. Running recent linux distros (debian based distros in my personal experience) I could easily compile opencv in x86_64 desktops to single board computers like raspberry pi, odroid, etc... by means of those instructions.
Related
ant design table how to display empty rows
I'm working with ant design using the Table component and am wondering if there is a way to display 10 rows at all times even if they are empty. For example, I have a data set with 11 items. The page size is set to 10, so the first ten items show on the first page and the last item shows on the second page. But the second page displays only one row and I would like it to display 10 (one with the item and nine empty rows). How can I go about doing this? Should I be writing a function or is there a prop I can use on the Table component? This is an example of what my second page looks like currently ^^^ my table component: import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Asylum Office', dataIndex: 'asylumOffice', key: 'asylumOffice', }, { title: 'Citizenship', dataIndex: 'citizenship', key: 'citizenship', }, { title: 'Race or Ethnicity', dataIndex: 'raceOrEthnicity', key: 'raceOrEthnicity', }, { title: 'Case Outcome', dataIndex: 'caseOutcome', key: 'caseOutcome', }, { title: 'Completion', dataIndex: 'completion', key: 'completion', }, { title: 'Current Date', dataIndex: 'currentDate', key: 'currentDate', }, ]; const data = [ { key: '1', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'other', caseOutcome: 'pending', completion: 'n', currentDate: 'f', }, { key: '2', asylumOffice: 'AWS', citizenship: 'A', raceOrEthnicity: 'other', caseOutcome: 'pending', completion: 'Y', currentDate: 'e', }, { key: '3', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '4', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '5', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '6', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '7', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '8', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '9', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '10', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, { key: '11', asylumOffice: 'AyS', citizenship: 'h', raceOrEthnicity: 'latino', caseOutcome: 'pending', completion: 's', currentDate: 'f', }, ]; function RenderTablePage(props) { return ( <div> <Table columns={columns} dataSource={data} title={() => 'Tabular View'} /> </div> ); } export default RenderTablePage;
How to check if two containers are linked properly?
I have 3 containers, say their names are A, B, C. Their definition, now that I tried to link them together (using the key links), is attached at the end of the question. How can I test that this linking worked properly? { 'A': { 'run_args': { 'name': 'A', 'detach': 'True', 'volumes': { '/var/run/datadog': {'bind': '/var/run/datadog', 'mode': 'rw'} }, 'ports': {'30000/tcp': '30000', '30010/tcp': '30010'}, 'restart_policy': {'name': 'always'}, 'log_config': {'type': 'syslog'}, 'command': A_cmd, 'links': {'B': 'B', 'C': 'C'} } }, 'B': { 'run_args': { 'name': 'B', 'detach': True, 'volumes': { '/etc/salt': {'bind': '/etc/salt', 'mode': 'rw'}, '/var/run/datadog': {'bind': '/var/run/datadog', 'mode': 'rw'} }, 'ports': {'8080/tcp': '80'}, 'restart_policy': {'name': 'always'}, 'command': B_cmd, 'tty': True, 'links': {'A': 'A', 'C': 'C'} } }, 'C': { 'run_args': { 'name': 'C', 'detach': True, 'volumes': { '/etc/salt': {'bind': '/etc/salt', 'mode': 'rw'}, '/var/run/datadog': {'bind': '/var/run/datadog', 'mode': 'rw'} }, 'ports': {'33000/tcp': '33000'}, 'restart_policy': {'name': 'always'}, 'command': C_cmd, 'tty': True, 'links': {'A': 'A', 'B': 'B'} } } }
ping container names from another container. If they are linked then it will respond.
mRNA/DNA to protein
The code that I am trying to produce is about translating a FASTA-file that contains nucleotides (U, T, C, G or A) from DNA or mRNA into amino acids. It went very well, but when I run my program, it reports some mistakes that I don't understand, even though I tried to fix it, it just doesn't work. Could you guys give me some tips? I searched some possible solutions, but it was too difficult for me to understand. My code #!/bin/usr/env python3 import sys codontable = { 'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M', 'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T', 'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K', 'AGC':'S', 'AGT':'S', 'AGA':'R', 'AGG':'R', 'CTA':'L', 'CTC':'L', 'CTG':'L', 'CTT':'L', 'CCA':'P', 'CCC':'P', 'CCG':'P', 'CCT':'P', 'CAC':'H', 'CAT':'H', 'CAA':'Q', 'CAG':'Q', 'CGA':'R', 'CGC':'R', 'CGG':'R', 'CGT':'R', 'GTA':'V', 'GTC':'V', 'GTG':'V', 'GTT':'V', 'GCA':'A', 'GCC':'A', 'GCG':'A', 'GCT':'A', 'GAC':'D', 'GAT':'D', 'GAA':'E', 'GAG':'E', 'GGA':'G', 'GGC':'G', 'GGG':'G', 'GGT':'G', 'TCA':'S', 'TCC':'S', 'TCG':'S', 'TCT':'S', 'TTC':'F', 'TTT':'F', 'TTA':'L', 'TTG':'L', 'TAC':'Y', 'TAT':'Y', 'TAA':'Stop', 'TAG':'Stop', 'TGC':'C', 'TGT':'C', 'TGA':'Stop', 'TGG':'W', 'AUA':'I', 'AUC':'I', 'AUU':'I', 'AUG':'M', 'ACU':'U', 'AAU':'N', 'AGU':'S', 'CUA':'L', 'CUG':'L', 'CUG':'L', 'CUU':'L', 'CCU':'P', 'CAU':'H', 'CGU':'R', 'GUA':'V', 'GUC':'V', 'GUG':'V', 'GUU':'V', 'GCU':'A', 'GAU':'D', 'GGU':'G', 'UCA':'S', 'UCC':'S', 'UCG':'S', 'UCU':'S', 'UUC':'F', 'UUU':'F', 'UUA':'L', 'UUG':'L', 'UAC':'Y', 'UAU':'Y', 'UAA':'Stop', 'UAG':'Stop', 'UGC':'C', 'UGU':'C', 'UGA':'Stop', 'UGG':'W'} def divideintriplets(startwhere, moveover = 3): startwhere = int(startwhere) moveover = int(moveover) readwhere = startwhere + moveover triplet = sequence[startwhere:readwhere] amino = codontable[triplet] lentriplet = len(triplet) if lentriplet == 3: return amino else: return None list_trans_nucl = [] filenames = sys.argv[1:] startwhere = input('n\Where to start with counting? Choose one; \n1: Start counting at the first nucleotide. \n2: Start counting at the second nucleotide. \n3: Start counting at the third nucleotide. \n') for file in filenames: count = 0 contains_aminoacid = False inputfile = open(file) for line in inputfile: if not line.startswith('>'): sequence = line.strip("") count += len(sequence) trans_nucl = divideintriplets(startwhere) list_trans_nucl.append(trans_nucl) for element in sequence: if element not in ['A', 'T', 'C', 'G', 'U']: contains_aminoacid = True if contains_aminoacid is False: print(list_trans_nucl) print("This file contains ", count, "nucleotides") What my command prompt says what is wrong Traceback (most recent call last): File "C:\Users\Desktop\CCR5\DNA_mRNA_translator.py", line 61, in <module> trans_nucl = divideintriplets(startwhere) File "C:\Users\Desktop\CCR5\DNA_mRNA_translator.py", line 41, in divideintriplets amino = codontable[triplet] KeyError: '' >gi|255652911:5001-11065 | Homo sapiens chemokine (C-C motif) receptor 5 (gene/pseudogene) (CCR5), RefSeqGene on chromosome 3 CTTCAGATAGATTATATCTGGAGTGAAGAATCCTGCCACCTATGTATCTGGCATAGTGTGAGTCCTCATA AATGCTTACTGGTTTGAAGGGCAACAAAATAGTGAACAGAGTGAAAATCCCCACTAAGATCCTGGGTCCA GAAAAAGATGGGAAACCTGTTTAGCTCACCCGTGAGCCCATAGTTAAAACTCTTTAGACAACAGGTTGTT TCCGTTTACAGAGAACAATAATATTGGGTGGTGAGCATCTGTGTGGGGGTTGGGGTGGGATAGGGGATAC GGGGAGAGTGGAGAAAAAGGGGACACAGGGTTAATGTGAAGTCCAGGATCCCCCTCTACATTTAAAGTTG GTTTAAGTTGGCTTTAATTAATAGCAACTCTTAAGATAATCAGAATTTTCTTAACCTTTTAGCCTTACTG TTGAAAAGCCCTGTGATCTTGTACAAATCATTTGCTTCTTGGATAGTAATTTCTTTTACTAAAATGTGGG CTTTTGACTAGATGAATGTAAATGTTCTTCTAGCTCTGATATCCTTTATTCTTTATATTTTCTAACAGAT TCTGTGTAGTGGGATGAGCAGAGAACAAAAACAAAATAATCCAGTGAGAAAAGCCCGTAAATAAACCTTC AGACCAGAGATCTATTCTCTAGCTTATTTTAAGCTCAACTTAAAAAGAAGAACTGTTCTCTGATTCTTTT CGCCTTCAATACACTTAATGATTTAACTCCACCCTCCTTCAAAAGAAACAGCATTTCCTACTTTTATACT GTCTATATGATTGATTTGCACAGCTCATCTGGCCAGAAGAGCTGAGACATCCGTTCCCCTACAAGAAACT CTCCCCGGTAAGTAACCTCTCAGCTGCTTGGCCTGTTAGTTAGCTTCTGAGATGAGTAAAAGACTTTACA GGAAACCCATAGAAGACATTTGGCAAACACCAAGTGCTCATACAATTATCTTAAAATATAATCTTTAAGA TAAGGAAAGGGTCACAGTTTGGAATGAGTTTCAGACGGTTATAACATCAAAGATACAAAACATGATTGTG AGTGAAAGACTTTAAAGGGAGCAATAGTATTTTAATAACTAACAATCCTTACCTCTCAAAAGAAAGATTT GCAGAGAGATGAGTCTTAGCTGAAATCTTGAAATCTTATCTTCTGCTAAGGAGAACTAAACCCTCTCCAG TGAGATGCCTTCTGAATATGTGCCCACAAGAAGTTGTGTCTAAGTCTGGTTCTCTTTTTTCTTTTTCCTC CAGACAAGAGGGAAGCCTAAAAATGGTCAAAATTAATATTAAATTACAAACGCCAAATAAAATTTTCCTC TAATATATCAGTTTCATGGCACAGTTAGTATATAATTCTTTATGGTTCAAAATTAAAAATGAGCTTTTCT AGGGGCTTCTCTCAGCTGCCTAGTCTAAGGTGCAGGGAGTTTGAGACTCACAGGGTTTAATAAGAGAAAA TTCTCAGCTAGAGCAGCTGAACTTAAATAGACTAGGCAAGACAGCTGGTTATAAGACTAAACTACCCAGA ATGCATGACATTCATCTGTGGTGGCAGACGAAACATTTTTTATTATATTATTTCTTGGGTATGTATGACA ACTCTTAATTGTGGCAACTCAGAAACTACAAACACAAACTTCACAGAAAATGTGAGGATTTTACAATTGG CTGTTGTCATCTATGACCTTCCCTGGGACTTGGGCACCCGGCCATTTCACTCTGACTACATCATGTCACC AAACATCTGATGGTCTTGCCTTTTAATTCTCTTTTCGAGGACTGAGAGGGAGGGTAGCATGGTAGTTAAG AGTGCAGGCTTCCCGCATTCAAAATCGGTTGCTTACTAGCTGTGTGGCTTTGAGCAAGTTACTCACCCTC TCTGTGCTTCAAGGTCCTTGTCTGCAAAATGTGAAAAATATTTCCTGCCTCATAAGGTTGCCCTAAGGAT TAAATGAATGAATGGGTATGATGCTTAGAACAGTGATTGGCATCCAGTATGTGCCCTCGAGGCCTCTTAA TTATTACTGGCTTGCTCATAGTGCATGTTCTTTGTGGGCTAACTCTAGCGTCAATAAAAATGTTAAGACT GAGTTGCAGCCGGGCATGGTGGCTCATGCCTGTAATCCCAGCATTCTAGGAGGCTGAGGCAGGAGGATCG CTTGAGCCCAGGAGTTCGAGACCAGCCTGGGCAACATAGTGTGATCTTGTATCTATAAAAATAAACAAAA TTAGCTTGGTGTGGTGGCGCCTGTAGTCCCCAGCCACTTGGAGGGGTGAGGTGAGAGGATTGCTTGAGCC CGGGATGGTCCAGGCTGCAGTGAGCCATGATCGTGCCACTGCACTCCAGCCTGGGCGACAGAGTGAGACC CTGTCTCACAACAACAACAACAACAACAAAAAGGCTGAGCTGCACCATGCTTGACCCAGTTTCTTAAAAT TGTTGTCAAAGCTTCATTCACTCCATGGTGCTATAGAGCACAAGATTTTATTTGGTGAGATGGTGCTTTC ATGAATTCCCCCAACAGAGCCAAGCTCTCCATCTAGTGGACAGGGAAGCTAGCAGCAAACCTTCCCTTCA CTACAAAACTTCATTGCTTGGCCAAAAAGAGAGTTAATTCAATGTAGACATCTATGTAGGCAATTAAAAA CCTATTGATGTATAAAACAGTTTGCATTCATGGAGGGCAACTAAATACATTCTAGGACTTTATAAAAGAT CACTTTTTATTTATGCACAGGGTGGAACAAGATGGATTATCAAGTGTCAAGTCCAATCTATGACATCAAT TATTATACATCGGAGCCCTGCCAAAAAATCAATGTGAAGCAAATCGCAGCCCGCCTCCTGCCTCCGCTCT ACTCACTGGTGTTCATCTTTGGTTTTGTGGGCAACATGCTGGTCATCCTCATCCTGATAAACTGCAAAAG GCTGAAGAGCATGACTGACATCTACCTGCTCAACCTGGCCATCTCTGACCTGTTTTTCCTTCTTACTGTC CCCTTCTGGGCTCACTATGCTGCCGCCCAGTGGGACTTTGGAAATACAATGTGTCAACTCTTGACAGGGC TCTATTTTATAGGCTTCTTCTCTGGAATCTTCTTCATCATCCTCCTGACAATCGATAGGTACCTGGCTGT CGTCCATGCTGTGTTTGCTTTAAAAGCCAGGACGGTCACCTTTGGGGTGGTGACAAGTGTGATCACTTGG GTGGTGGCTGTGTTTGCGTCTCTCCCAGGAATCATCTTTACCAGATCTCAAAAAGAAGGTCTTCATTACA CCTGCAGCTCTCATTTTCCATACAGTCAGTATCAATTCTGGAAGAATTTCCAGACATTAAAGATAGTCAT CTTGGGGCTGGTCCTGCCGCTGCTTGTCATGGTCATCTGCTACTCGGGAATCCTAAAAACTCTGCTTCGG TGTCGAAATGAGAAGAAGAGGCACAGGGCTGTGAGGCTTATCTTCACCATCATGATTGTTTATTTTCTCT TCTGGGCTCCCTACAACATTGTCCTTCTCCTGAACACCTTCCAGGAATTCTTTGGCCTGAATAATTGCAG TAGCTCTAACAGGTTGGACCAAGCTATGCAGGTGACAGAGACTCTTGGGATGACGCACTGCTGCATCAAC CCCATCATCTATGCCTTTGTCGGGGAGAAGTTCAGAAACTACCTCTTAGTCTTCTTCCAAAAGCACATTG CCAAACGCTTCTGCAAATGCTGTTCTATTTTCCAGCAAGAGGCTCCCGAGCGAGCAAGCTCAGTTTACAC CCGATCCACTGGGGAGCAGGAAATATCTGTGGGCTTGTGACACGGACTCAAGTGGGCTGGTGACCCAGTC AGAGTTGTGCACATGGCTTAGTTTTCATACACAGCCTGGGCTGGGGGTGGGGTGGGAGAGGTCTTTTTTA AAAGGAAGTTACTGTTATAGAGGGTCTAAGATTCATCCATTTATTTGGCATCTGTTTAAAGTAGATTAGA TCTTTTAAGCCCATCAATTATAGAAAGCCAAATCAAAATATGTTGATGAAAAATAGCAACCTTTTTATCT CCCCTTCACATGCATCAAGTTATTGACAAACTCTCCCTTCACTCCGAAAGTTCCTTATGTATATTTAAAA GAAAGCCTCAGAGAATTGCTGATTCTTGAGTTTAGTGATCTGAACAGAAATACCAAAATTATTTCAGAAA TGTACAACTTTTTACCTAGTACAAGGCAACATATAGGTTGTAAATGTGTTTAAAACAGGTCTTTGTCTTG CTATGGGGAGAAAAGACATGAATATGATTAGTAAAGAAATGACACTTTTCATGTGTGATTTCCCCTCCAA GGTATGGTTAATAAGTTTCACTGACTTAGAACCAGGCGAGAGACTTGTGGCCTGGGAGAGCTGGGGAAGC TTCTTAAATGAGAAGGAATTTGAGTTGGATCATCTATTGCTGGCAAAGACAGAAGCCTCACTGCAAGCAC TGCATGGGCAAGCTTGGCTGTAGAAGGAGACAGAGCTGGTTGGGAAGACATGGGGAGGAAGGACAAGGCT AGATCATGAAGAACCTTGACGGCATTGCTCCGTCTAAGTCATGAGCTGAGCAGGGAGATCCTGGTTGGTG TTGCAGAAGGTTTACTCTGTGGCCAAAGGAGGGTCAGGAAGGATGAGCATTTAGGGCAAGGAGACCACCA ACAGCCCTCAGGTCAGGGTGAGGATGGCCTCTGCTAAGCTCAAGGCGTGAGGATGGGAAGGAGGGAGGTA TTCGTAAGGATGGGAAGGAGGGAGGTATTCGTGCAGCATATGAGGATGCAGAGTCAGCAGAACTGGGGTG GATTTGGGTTGGAAGTGAGGGTCAGAGAGGAGTCAGAGAGAATCCCTAGTCTTCAAGCAGATTGGAGAAA CCCTTGAAAAGACATCAAGCACAGAAGGAGGAGGAGGAGGTTTAGGTCAAGAAGAAGATGGATTGGTGTA AAAGGATGGGTCTGGTTTGCAGAGCTTGAACACAGTCTCACCCAGACTCCAGGCTGTCTTTCACTGAATG CTTCTGACTTCATAGATTTCCTTCCCATCCCAGCTGAAATACTGAGGGGTCTCCAGGAGGAGACTAGATT TATGAATACACGAGGTATGAGGTCTAGGAACATACTTCAGCTCACACATGAGATCTAGGTGAGGATTGAT TACCTAGTAGTCATTTCATGGGTTGTTGGGAGGATTCTATGAGGCAACCACAGGCAGCATTTAGCACATA CTACACATTCAATAAGCATCAAACTCTTAGTTACTCATTCAGGGATAGCACTGAGCAAAGCATTGAGCAA AGGGGTCCCATAGAGGTGAGGGAAGCCTGAAAAACTAAGATGCTGCCTGCCCAGTGCACACAAGTGTAGG TATCATTTTCTGCATTTAACCGTCAATAGGCAAAGGGGGGAAGGGACATATTCATTTGGAAATAAGCTGC CTTGAGCCTTAAAACCCACAAAAGTACAATTTACCAGCCTCCGTATTTCAGACTGAATGGGGGTGGGGGG GGCGCCTTAGGTACTTATTCCAGATGCCTTCTCCAGACAAACCAGAAGCAACAGAAAAAATCGTCTCTCC CTCCCTTTGAAATGAATATACCCCTTAGTGTTTGGGTATATTCATTTCAAAGGGAGAGAGAGAGGTTTTT TTCTGTTCTGTCTCATATGATTGTGCACATACTTGAGACTGTTTTGAATTTGGGGGATGGCTAAAACCAT CATAGTACAGGTAAGGTGAGGGAATAGTAAGTGGTGAGAACTACTCAGGGAATGAAGGTGTCAGAATAAT AAGAGGTGCTACTGACTTTCTCAGCCTCTGAATATGAACGGTGAGCATTGTGGCTGTCAGCAGGAAGCAA CGAAGGGAAATGTCTTTCCTTTTGCTCTTAAGTTGTGGAGAGTGCAACAGTAGCATAGGACCCTACCCTC TGGGCCAAGTCAAAGACATTCTGACATCTTAGTATTTGCATATTCTTATGTATGTGAAAGTTACAAATTG CTTGAAAGAAAATATGCATCTAATAAAAAACACCTTCTAAAATAA
This code has a number of problems: 1) This is a no-op? sequence = line.strip("") I suggest: sequence = line.rstrip() until you've had a chance to read up on strip() and its variants. 2) This test comes after the code that assumes the data is OK: amino = codontable[triplet] lentriplet = len(triplet) if lentriplet == 3: If lentriplet wasn't 3, should you have looked it up in codontable? 3) This test comes after the code that assumes the data is OK: trans_nucl = divideintriplets(startwhere) ... for element in sequence: if element not in ['A', 'T', 'C', 'G', 'U']: contains_aminoacid = True if contains_aminoacid is False: If this wasn't a nuecleotide sequence, why did you first divide it into triplets? Test first, proceed if OK. Not the other way 'round. 4) necleotide sequence 'CUG' is defined twice in the dictionary. 5) divideintriplets shouldn't return None on error if the caller isn't checking for any error: trans_nucl = divideintriplets(startwhere) list_trans_nucl.append(trans_nucl) 6) That critical "you seem to be just pulling off the first triplet, and throwing the rest away" thing that #JohnColeman mentioned. 7) Other stuff like list_trans_nucl = [] should be (re)initialized for each file, not just once. My rework of your code, sans codon table: import sys codontable = { ... } def divideintriplets(sequence, startwhere, moveover=3): codons = [] length = len(sequence) readwhere = startwhere + moveover while readwhere < length: triplet = sequence[startwhere:readwhere] assert len(triplet) == 3 assert triplet in codontable codons.append(codontable[triplet]) startwhere += moveover readwhere = startwhere + moveover return codons filenames = sys.argv[1:] startwhere = input('\nWhere to start with counting? Choose one; \n1: Start counting at the first nucleotide. \n2: Start counting at the second nucleotide. \n3: Start counting at the third nucleotide. \n') for filename in filenames: list_trans_nucl = [] count = 0 contains_nuecleotides = True with open(filename) as inputfile: for line in inputfile: if not line.startswith('>'): sequence = line.rstrip() for element in sequence: if element not in 'ATCGU': contains_nuecleotides = False break if not contains_nuecleotides: break count += len(sequence) trans_nucl = divideintriplets(sequence, int(startwhere)) list_trans_nucl.extend(trans_nucl) print(list_trans_nucl) print("File", filename, "contains", count, "nucleotides") OUTPUT % python3 test.py file0.fasta Where to start with counting? Choose one; 1: Start counting at the first nucleotide. 2: Start counting at the second nucleotide. 3: Start counting at the third nucleotide. 1 ['F', 'R', 'Stop', 'I', 'I', 'S', 'G', 'V', 'K', 'N', 'P', 'A', 'T', 'Y', 'V', 'S', 'G', 'I', 'V', 'Stop', 'V', 'L', 'M', 'L', 'T', 'G', 'L', 'K', 'G', 'N', 'K', 'I', 'V', 'N', 'R', 'V', 'K', 'I', 'P', 'T', 'K', 'I', 'L', 'G', 'K', 'K', 'M', 'G', 'N', 'L', 'F', 'S', 'S', 'P', 'V', 'S', 'P', 'Stop', 'L', 'K', 'L', 'F', 'R', 'Q', 'Q', 'V', 'P', 'F', 'T', 'E', 'N', 'N', 'N', 'I', 'G', 'W', 'Stop', 'A', 'S', 'V', 'W', 'G', 'L', 'G', 'W', 'D', 'R', 'G', 'G', 'R', 'V', 'E', 'K', 'K', 'G', 'T', 'Q', 'G', 'Stop', 'C', 'E', 'V', 'Q', 'D', 'P', 'P', 'L', 'H', 'L', 'K', 'F', 'K', 'L', 'A', 'L', 'I', 'N', 'S', 'N', 'S', 'Stop', 'D', 'N', 'Q', 'N', 'F', 'L', 'N', 'L', 'L', 'A', 'L', 'Stop', 'K', 'A', 'L', 'Stop', 'S', 'C', 'T', 'N', 'H', 'L', 'L', 'L', 'G', 'Stop', 'Stop', 'F', 'L', 'L', 'L', 'K', 'C', 'F', 'Stop', 'L', 'D', 'E', 'C', 'K', 'C', 'S', 'S', 'S', 'S', 'D', 'I', 'L', 'Y', 'S', 'L', 'Y', 'F', 'L', 'T', 'L', 'C', 'S', 'G', 'M', 'S', 'R', 'E', 'Q', 'K', 'Q', 'N', 'N', 'P', 'V', 'R', 'K', 'A', 'R', 'K', 'Stop', 'T', 'D', 'Q', 'R', 'S', 'I', 'L', 'Stop', 'L', 'I', 'L', 'S', 'S', 'T', 'Stop', 'K', 'E', 'E', 'L', 'F', 'S', 'D', 'S', 'A', 'F', 'N', 'T', 'L', 'N', 'D', 'L', 'T', 'P', 'P', 'S', 'F', 'K', 'R', 'N', 'S', 'I', 'S', 'Y', 'F', 'Y', 'S', 'I', 'Stop', 'L', 'I', 'C', 'T', 'A', 'H', 'L', 'A', 'R', 'R', 'A', 'E', 'T', 'S', 'V', 'P', 'L', 'Q', 'E', 'S', 'P', 'V', 'S', 'N', 'L', 'S', 'A', 'A', 'W', 'P', 'V', 'S', 'Stop', 'L', 'L', 'R', 'Stop', 'V', 'K', 'D', 'F', 'E', 'T', 'H', 'R', 'R', 'H', 'L', 'A', 'N', 'T', 'K', 'C', 'S', 'Y', 'N', 'Y', 'L', 'K', 'I', 'Stop', 'S', 'L', 'K', 'E', 'R', 'V', 'T', 'V', 'W', 'N', 'E', 'F', 'Q', 'T', 'V', 'I', 'T', 'S', 'K', 'I', 'Q', 'N', 'M', 'I', 'V', 'K', 'D', 'F', 'K', 'G', 'S', 'N', 'S', 'I', 'L', 'I', 'T', 'N', 'N', 'P', 'Y', 'L', 'S', 'K', 'E', 'R', 'Q', 'R', 'D', 'E', 'S', 'Stop', 'L', 'K', 'S', 'Stop', 'N', 'L', 'I', 'F', 'C', 'Stop', 'G', 'E', 'L', 'N', 'P', 'L', 'E', 'M', 'P', 'S', 'E', 'Y', 'V', 'P', 'T', 'R', 'S', 'C', 'V', 'Stop', 'V', 'W', 'F', 'S', 'F', 'F', 'F', 'F', 'R', 'Q', 'E', 'G', 'S', 'L', 'K', 'M', 'V', 'K', 'I', 'N', 'I', 'K', 'L', 'Q', 'T', 'P', 'N', 'K', 'I', 'F', 'N', 'I', 'S', 'V', 'S', 'W', 'H', 'S', 'Stop', 'Y', 'I', 'I', 'L', 'Y', 'G', 'S', 'K', 'L', 'K', 'M', 'S', 'F', 'G', 'A', 'S', 'L', 'S', 'C', 'L', 'V', 'Stop', 'G', 'A', 'G', 'S', 'L', 'R', 'L', 'T', 'G', 'F', 'N', 'K', 'R', 'S', 'Q', 'L', 'E', 'Q', 'L', 'N', 'L', 'N', 'R', 'L', 'G', 'K', 'T', 'A', 'G', 'Y', 'K', 'T', 'K', 'L', 'P', 'C', 'M', 'T', 'F', 'I', 'C', 'G', 'G', 'R', 'R', 'N', 'I', 'F', 'Y', 'Y', 'I', 'I', 'S', 'W', 'V', 'C', 'M', 'L', 'L', 'I', 'V', 'A', 'T', 'Q', 'K', 'L', 'Q', 'T', 'Q', 'T', 'S', 'Q', 'K', 'M', 'Stop', 'G', 'F', 'Y', 'N', 'C', 'C', 'H', 'L', 'Stop', 'P', 'S', 'L', 'G', 'L', 'G', 'H', 'P', 'A', 'I', 'S', 'L', 'Stop', 'L', 'H', 'H', 'V', 'N', 'I', 'Stop', 'W', 'S', 'C', 'L', 'L', 'I', 'L', 'F', 'S', 'R', 'T', 'E', 'R', 'E', 'G', 'S', 'M', 'V', 'V', 'V', 'Q', 'A', 'S', 'R', 'I', 'Q', 'N', 'R', 'L', 'L', 'T', 'S', 'C', 'V', 'A', 'L', 'S', 'K', 'L', 'L', 'T', 'L', 'C', 'F', 'K', 'V', 'L', 'V', 'C', 'K', 'M', 'Stop', 'K', 'I', 'F', 'P', 'A', 'S', 'Stop', 'G', 'C', 'P', 'K', 'K', 'Stop', 'M', 'N', 'G', 'Y', 'D', 'A', 'Stop', 'N', 'S', 'D', 'W', 'H', 'P', 'V', 'C', 'A', 'L', 'E', 'A', 'S', 'Y', 'Y', 'W', 'L', 'A', 'H', 'S', 'A', 'C', 'S', 'L', 'W', 'A', 'N', 'S', 'S', 'V', 'N', 'K', 'N', 'V', 'K', 'S', 'C', 'S', 'R', 'A', 'W', 'W', 'L', 'M', 'P', 'V', 'I', 'P', 'A', 'F', 'Stop', 'E', 'A', 'E', 'A', 'G', 'G', 'L', 'S', 'P', 'G', 'V', 'R', 'D', 'Q', 'P', 'G', 'Q', 'H', 'S', 'V', 'I', 'L', 'Y', 'L', 'Stop', 'K', 'Stop', 'T', 'Stop', 'L', 'G', 'V', 'V', 'A', 'P', 'V', 'V', 'P', 'S', 'H', 'L', 'E', 'G', 'Stop', 'G', 'E', 'R', 'I', 'A', 'Stop', 'G', 'M', 'V', 'Q', 'A', 'A', 'V', 'S', 'H', 'D', 'R', 'A', 'T', 'A', 'L', 'Q', 'P', 'G', 'R', 'Q', 'S', 'E', 'C', 'L', 'T', 'T', 'T', 'T', 'T', 'T', 'T', 'K', 'R', 'L', 'S', 'C', 'T', 'M', 'L', 'D', 'P', 'V', 'S', 'Stop', 'V', 'V', 'K', 'A', 'S', 'F', 'T', 'P', 'W', 'C', 'Y', 'R', 'A', 'Q', 'D', 'F', 'I', 'W', 'Stop', 'D', 'G', 'A', 'Stop', 'I', 'P', 'P', 'T', 'E', 'P', 'S', 'S', 'P', 'S', 'S', 'G', 'Q', 'G', 'S', 'Stop', 'Q', 'Q', 'T', 'F', 'P', 'Y', 'K', 'T', 'S', 'L', 'L', 'G', 'Q', 'K', 'E', 'S', 'Stop', 'F', 'N', 'V', 'D', 'I', 'Y', 'V', 'G', 'N', 'Stop', 'L', 'L', 'M', 'Y', 'K', 'T', 'V', 'C', 'I', 'H', 'G', 'G', 'Q', 'L', 'N', 'T', 'F', 'Stop', 'D', 'F', 'I', 'K', 'T', 'F', 'Y', 'L', 'C', 'T', 'G', 'W', 'N', 'K', 'M', 'D', 'Y', 'Q', 'V', 'S', 'S', 'P', 'I', 'Y', 'D', 'I', 'I', 'I', 'H', 'R', 'S', 'P', 'A', 'K', 'K', 'S', 'M', 'Stop', 'S', 'K', 'S', 'Q', 'P', 'A', 'S', 'C', 'L', 'R', 'L', 'T', 'G', 'V', 'H', 'L', 'W', 'F', 'C', 'G', 'Q', 'H', 'A', 'G', 'H', 'P', 'H', 'P', 'D', 'K', 'L', 'Q', 'L', 'K', 'S', 'M', 'T', 'D', 'I', 'Y', 'L', 'L', 'N', 'L', 'A', 'I', 'S', 'D', 'L', 'F', 'F', 'L', 'L', 'T', 'P', 'S', 'G', 'L', 'T', 'M', 'L', 'P', 'P', 'S', 'G', 'T', 'L', 'E', 'I', 'Q', 'C', 'V', 'N', 'S', 'Stop', 'Q', 'L', 'F', 'Y', 'R', 'L', 'L', 'L', 'W', 'N', 'L', 'L', 'H', 'H', 'P', 'P', 'D', 'N', 'R', 'Stop', 'V', 'P', 'G', 'V', 'H', 'A', 'V', 'F', 'A', 'L', 'K', 'A', 'R', 'T', 'V', 'T', 'F', 'G', 'V', 'V', 'T', 'S', 'V', 'I', 'T', 'W', 'W', 'L', 'C', 'L', 'R', 'L', 'S', 'Q', 'E', 'S', 'S', 'L', 'P', 'D', 'L', 'K', 'K', 'K', 'V', 'F', 'I', 'L', 'Q', 'L', 'S', 'F', 'S', 'I', 'Q', 'S', 'V', 'S', 'I', 'L', 'E', 'E', 'F', 'P', 'D', 'I', 'K', 'D', 'S', 'L', 'G', 'L', 'V', 'L', 'P', 'L', 'L', 'V', 'M', 'V', 'I', 'C', 'Y', 'S', 'G', 'I', 'L', 'K', 'T', 'L', 'L', 'V', 'E', 'M', 'R', 'R', 'R', 'G', 'T', 'G', 'L', 'Stop', 'G', 'L', 'S', 'S', 'P', 'S', 'Stop', 'L', 'F', 'I', 'F', 'L', 'G', 'S', 'L', 'Q', 'H', 'C', 'P', 'S', 'P', 'E', 'H', 'L', 'P', 'G', 'I', 'L', 'W', 'P', 'E', 'Stop', 'L', 'S', 'S', 'N', 'R', 'L', 'D', 'Q', 'A', 'M', 'Q', 'V', 'T', 'E', 'T', 'L', 'G', 'M', 'T', 'H', 'C', 'C', 'I', 'P', 'S', 'S', 'M', 'P', 'L', 'S', 'G', 'R', 'S', 'S', 'E', 'T', 'T', 'S', 'Stop', 'S', 'S', 'S', 'K', 'S', 'T', 'Q', 'T', 'L', 'L', 'Q', 'M', 'L', 'F', 'Y', 'F', 'P', 'A', 'R', 'G', 'S', 'R', 'A', 'S', 'K', 'L', 'S', 'L', 'R', 'S', 'T', 'G', 'E', 'Q', 'E', 'I', 'S', 'V', 'G', 'L', 'Stop', 'H', 'G', 'L', 'K', 'W', 'A', 'G', 'D', 'P', 'E', 'L', 'C', 'T', 'W', 'L', 'S', 'F', 'H', 'T', 'Q', 'P', 'G', 'L', 'G', 'V', 'G', 'W', 'E', 'R', 'S', 'F', 'K', 'E', 'V', 'T', 'V', 'I', 'E', 'G', 'L', 'R', 'F', 'I', 'H', 'L', 'F', 'G', 'I', 'C', 'L', 'K', 'Stop', 'I', 'L', 'L', 'S', 'P', 'S', 'I', 'I', 'E', 'S', 'Q', 'I', 'K', 'I', 'C', 'Stop', 'Stop', 'K', 'I', 'A', 'T', 'F', 'L', 'P', 'F', 'T', 'C', 'I', 'K', 'L', 'L', 'T', 'N', 'S', 'P', 'F', 'T', 'P', 'K', 'V', 'P', 'Y', 'V', 'Y', 'L', 'K', 'A', 'S', 'E', 'N', 'C', 'Stop', 'F', 'L', 'S', 'L', 'V', 'I', 'Stop', 'T', 'E', 'I', 'P', 'K', 'L', 'F', 'Q', 'V', 'Q', 'L', 'F', 'T', 'Stop', 'Y', 'K', 'A', 'T', 'Y', 'R', 'L', 'Stop', 'M', 'C', 'L', 'K', 'Q', 'V', 'F', 'V', 'Y', 'G', 'E', 'K', 'R', 'H', 'E', 'Y', 'D', 'Stop', 'Stop', 'R', 'N', 'D', 'T', 'F', 'H', 'V', 'Stop', 'F', 'P', 'L', 'V', 'W', 'L', 'I', 'S', 'F', 'T', 'D', 'L', 'E', 'P', 'G', 'E', 'R', 'L', 'V', 'A', 'W', 'E', 'S', 'W', 'G', 'S', 'Stop', 'M', 'R', 'R', 'N', 'L', 'S', 'W', 'I', 'I', 'Y', 'C', 'W', 'Q', 'R', 'Q', 'K', 'P', 'H', 'C', 'K', 'A', 'W', 'A', 'S', 'L', 'A', 'V', 'E', 'G', 'D', 'R', 'A', 'G', 'W', 'E', 'D', 'M', 'G', 'R', 'K', 'D', 'K', 'D', 'H', 'E', 'E', 'P', 'Stop', 'R', 'H', 'C', 'S', 'V', 'Stop', 'V', 'M', 'S', 'Stop', 'A', 'G', 'R', 'S', 'W', 'L', 'C', 'R', 'R', 'F', 'T', 'L', 'W', 'P', 'K', 'E', 'G', 'Q', 'E', 'G', 'Stop', 'A', 'F', 'R', 'A', 'R', 'R', 'P', 'Q', 'P', 'S', 'G', 'Q', 'G', 'E', 'D', 'G', 'L', 'C', 'Stop', 'A', 'Q', 'G', 'V', 'R', 'M', 'G', 'R', 'R', 'E', 'S', 'Stop', 'G', 'W', 'E', 'G', 'G', 'R', 'Y', 'S', 'C', 'S', 'I', 'Stop', 'G', 'C', 'R', 'V', 'S', 'R', 'T', 'G', 'I', 'W', 'V', 'G', 'S', 'E', 'G', 'Q', 'R', 'G', 'V', 'R', 'E', 'N', 'P', 'Stop', 'S', 'S', 'S', 'R', 'L', 'E', 'P', 'Stop', 'K', 'D', 'I', 'K', 'H', 'R', 'R', 'R', 'R', 'R', 'R', 'F', 'R', 'S', 'R', 'R', 'R', 'W', 'I', 'G', 'K', 'D', 'G', 'S', 'G', 'L', 'Q', 'S', 'L', 'N', 'T', 'V', 'S', 'P', 'R', 'L', 'Q', 'A', 'V', 'F', 'H', 'Stop', 'F', 'Stop', 'L', 'H', 'R', 'F', 'P', 'S', 'H', 'P', 'S', 'Stop', 'N', 'T', 'E', 'G', 'S', 'P', 'G', 'G', 'D', 'Stop', 'M', 'N', 'T', 'R', 'G', 'M', 'R', 'S', 'R', 'N', 'I', 'L', 'Q', 'L', 'T', 'H', 'E', 'I', 'Stop', 'V', 'R', 'I', 'T', 'Stop', 'Stop', 'S', 'F', 'H', 'G', 'L', 'L', 'G', 'G', 'F', 'Y', 'E', 'A', 'T', 'T', 'G', 'S', 'I', 'Stop', 'H', 'Y', 'T', 'F', 'N', 'K', 'H', 'Q', 'T', 'L', 'S', 'Y', 'S', 'F', 'R', 'D', 'S', 'T', 'E', 'Q', 'S', 'I', 'E', 'G', 'V', 'P', 'Stop', 'R', 'Stop', 'G', 'K', 'P', 'E', 'K', 'L', 'R', 'C', 'C', 'L', 'P', 'S', 'A', 'H', 'K', 'C', 'I', 'I', 'F', 'C', 'I', 'Stop', 'P', 'S', 'I', 'G', 'K', 'G', 'G', 'K', 'G', 'H', 'I', 'H', 'L', 'E', 'I', 'S', 'L', 'S', 'L', 'K', 'T', 'H', 'K', 'S', 'T', 'I', 'Y', 'Q', 'P', 'P', 'Y', 'F', 'R', 'L', 'N', 'G', 'G', 'G', 'A', 'P', 'Stop', 'V', 'L', 'I', 'P', 'D', 'A', 'F', 'S', 'R', 'Q', 'T', 'R', 'S', 'N', 'R', 'K', 'N', 'R', 'L', 'S', 'L', 'Stop', 'N', 'E', 'Y', 'T', 'P', 'Stop', 'C', 'L', 'G', 'I', 'F', 'I', 'S', 'K', 'G', 'E', 'R', 'E', 'V', 'S', 'V', 'L', 'S', 'H', 'M', 'I', 'V', 'H', 'I', 'L', 'E', 'T', 'V', 'L', 'N', 'L', 'G', 'D', 'G', 'Stop', 'N', 'I', 'V', 'Q', 'V', 'R', 'Stop', 'G', 'N', 'S', 'K', 'W', 'Stop', 'E', 'L', 'L', 'R', 'E', 'Stop', 'R', 'C', 'Q', 'N', 'R', 'G', 'A', 'T', 'D', 'F', 'L', 'S', 'L', 'Stop', 'I', 'Stop', 'T', 'V', 'S', 'I', 'V', 'A', 'V', 'S', 'R', 'K', 'E', 'G', 'K', 'C', 'L', 'S', 'F', 'C', 'S', 'Stop', 'V', 'V', 'E', 'S', 'A', 'T', 'V', 'A', 'Stop', 'D', 'P', 'T', 'G', 'P', 'S', 'Q', 'R', 'H', 'S', 'D', 'I', 'L', 'V', 'F', 'A', 'Y', 'S', 'Y', 'V', 'C', 'E', 'S', 'Y', 'K', 'L', 'K', 'E', 'N', 'M', 'H', 'L', 'I', 'K', 'N', 'T', 'F', 'Stop', 'N'] File file0.fasta contains 6065 nucleotides %
From what I can see the problem is that the key '' does not exist in your initial variable codontable. My guess is that the input file you are providing has empty key/s.
Installing Opencv in ubuntu 14.10
I have tried almost all the blogs pertaining to the installation of OpenCv but I can't perform the make step. I am getting the following problem Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o In file included from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:65:0, from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg.cpp:45: /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:98:7: error: ‘CODEC_ID_H264’ was not declared in this scope { CODEC_ID_H264, MKTAG('H', '2', '6', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:99:7: error: ‘CODEC_ID_H264’ was not declared in this scope { CODEC_ID_H264, MKTAG('h', '2', '6', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:100:7: error: ‘CODEC_ID_H264’ was not declared in this scope { CODEC_ID_H264, MKTAG('X', '2', '6', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:101:7: error: ‘CODEC_ID_H264’ was not declared in this scope { CODEC_ID_H264, MKTAG('x', '2', '6', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:102:7: error: ‘CODEC_ID_H264’ was not declared in this scope { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:103:7: error: ‘CODEC_ID_H264’ was not declared in this scope { CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:105:7: error: ‘CODEC_ID_H263’ was not declared in this scope { CODEC_ID_H263, MKTAG('H', '2', '6', '3') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:106:7: error: ‘CODEC_ID_H263P’ was not declared in this scope { CODEC_ID_H263P, MKTAG('H', '2', '6', '3') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:107:7: error: ‘CODEC_ID_H263I’ was not declared in this scope { CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */ ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:108:7: error: ‘CODEC_ID_H261’ was not declared in this scope { CODEC_ID_H261, MKTAG('H', '2', '6', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:111:7: error: ‘CODEC_ID_H263P’ was not declared in this scope { CODEC_ID_H263P, MKTAG('U', '2', '6', '3') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:112:7: error: ‘CODEC_ID_H263P’ was not declared in this scope { CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:114:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:115:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:116:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:117:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:118:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:119:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:120:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */ ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:123:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:124:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:125:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:126:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:127:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('W', 'V', '1', 'F') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:128:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('S', 'E', 'D', 'G') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:130:7: error: ‘CODEC_ID_MPEG4’ was not declared in this scope { CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:132:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') }, /* default signature when using MSMPEG4 */ ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:133:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:136:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:137:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:138:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:139:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:140:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:141:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:142:7: error: ‘CODEC_ID_MSMPEG4V3’ was not declared in this scope { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:144:7: error: ‘CODEC_ID_MSMPEG4V2’ was not declared in this scope { CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:147:7: error: ‘CODEC_ID_MSMPEG4V2’ was not declared in this scope { CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:149:7: error: ‘CODEC_ID_MSMPEG4V1’ was not declared in this scope { CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:151:7: error: ‘CODEC_ID_WMV1’ was not declared in this scope { CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:154:7: error: ‘CODEC_ID_WMV2’ was not declared in this scope { CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:155:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:156:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'd') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:157:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:158:7: error: ‘CODEC_ID_DVVIDEO’ was not declared in this scope { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '2', '5') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:159:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:160:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:161:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:162:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope { CODEC_ID_MPEG2VIDEO, MKTAG('M', 'P', 'E', 'G') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:163:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope { CODEC_ID_MPEG1VIDEO, MKTAG('P', 'I', 'M', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:164:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope { CODEC_ID_MPEG1VIDEO, MKTAG('V', 'C', 'R', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:165:7: error: ‘CODEC_ID_MPEG1VIDEO’ was not declared in this scope { CODEC_ID_MPEG1VIDEO, 0x10000001 }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:166:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope { CODEC_ID_MPEG2VIDEO, 0x10000002 }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:167:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope { CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:168:7: error: ‘CODEC_ID_MPEG2VIDEO’ was not declared in this scope { CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:169:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:170:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope { CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:171:7: error: ‘CODEC_ID_LJPEG’ was not declared in this scope { CODEC_ID_LJPEG, MKTAG('L', 'J', 'P', 'G') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:172:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope { CODEC_ID_MJPEG, MKTAG('J', 'P', 'G', 'L') }, /* Pegasus lossless JPEG */ ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:173:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope { CODEC_ID_MJPEG, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - decoder */ ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:174:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope { CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:175:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope { CODEC_ID_MJPEG, MKTAG('I', 'J', 'P', 'G') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:176:7: error: ‘CODEC_ID_MJPEG’ was not declared in this scope { CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:177:7: error: ‘CODEC_ID_HUFFYUV’ was not declared in this scope { CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:178:7: error: ‘CODEC_ID_FFVHUFF’ was not declared in this scope { CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:179:7: error: ‘CODEC_ID_CYUV’ was not declared in this scope { CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:180:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, 0 }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:181:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:182:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:183:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:184:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:185:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:186:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:187:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:188:7: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope { CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:189:7: error: ‘CODEC_ID_INDEO3’ was not declared in this scope { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:190:7: error: ‘CODEC_ID_INDEO3’ was not declared in this scope { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:191:7: error: ‘CODEC_ID_VP3’ was not declared in this scope { CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:192:7: error: ‘CODEC_ID_VP3’ was not declared in this scope { CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:193:7: error: ‘CODEC_ID_ASV1’ was not declared in this scope { CODEC_ID_ASV1, MKTAG('A', 'S', 'V', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:194:7: error: ‘CODEC_ID_ASV2’ was not declared in this scope { CODEC_ID_ASV2, MKTAG('A', 'S', 'V', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:195:7: error: ‘CODEC_ID_VCR1’ was not declared in this scope { CODEC_ID_VCR1, MKTAG('V', 'C', 'R', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:196:7: error: ‘CODEC_ID_FFV1’ was not declared in this scope { CODEC_ID_FFV1, MKTAG('F', 'F', 'V', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:197:7: error: ‘CODEC_ID_XAN_WC4’ was not declared in this scope { CODEC_ID_XAN_WC4, MKTAG('X', 'x', 'a', 'n') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:198:7: error: ‘CODEC_ID_MSRLE’ was not declared in this scope { CODEC_ID_MSRLE, MKTAG('m', 'r', 'l', 'e') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:199:7: error: ‘CODEC_ID_MSRLE’ was not declared in this scope { CODEC_ID_MSRLE, MKTAG(0x1, 0x0, 0x0, 0x0) }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:200:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope { CODEC_ID_MSVIDEO1, MKTAG('M', 'S', 'V', 'C') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:201:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope { CODEC_ID_MSVIDEO1, MKTAG('m', 's', 'v', 'c') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:202:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope { CODEC_ID_MSVIDEO1, MKTAG('C', 'R', 'A', 'M') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:203:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope { CODEC_ID_MSVIDEO1, MKTAG('c', 'r', 'a', 'm') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:204:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope { CODEC_ID_MSVIDEO1, MKTAG('W', 'H', 'A', 'M') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:205:7: error: ‘CODEC_ID_MSVIDEO1’ was not declared in this scope { CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:206:7: error: ‘CODEC_ID_CINEPAK’ was not declared in this scope { CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:207:7: error: ‘CODEC_ID_TRUEMOTION1’ was not declared in this scope { CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:208:7: error: ‘CODEC_ID_MSZH’ was not declared in this scope { CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:209:7: error: ‘CODEC_ID_ZLIB’ was not declared in this scope { CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:210:7: error: ‘CODEC_ID_SNOW’ was not declared in this scope { CODEC_ID_SNOW, MKTAG('S', 'N', 'O', 'W') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:211:7: error: ‘CODEC_ID_4XM’ was not declared in this scope { CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:212:7: error: ‘CODEC_ID_FLV1’ was not declared in this scope { CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:213:7: error: ‘CODEC_ID_SVQ1’ was not declared in this scope { CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:214:7: error: ‘CODEC_ID_TSCC’ was not declared in this scope { CODEC_ID_TSCC, MKTAG('t', 's', 'c', 'c') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:215:7: error: ‘CODEC_ID_ULTI’ was not declared in this scope { CODEC_ID_ULTI, MKTAG('U', 'L', 'T', 'I') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:216:7: error: ‘CODEC_ID_VIXL’ was not declared in this scope { CODEC_ID_VIXL, MKTAG('V', 'I', 'X', 'L') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:217:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope { CODEC_ID_QPEG, MKTAG('Q', 'P', 'E', 'G') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:218:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:219:7: error: ‘CODEC_ID_QPEG’ was not declared in this scope { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:220:7: error: ‘CODEC_ID_WMV3’ was not declared in this scope { CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:221:7: error: ‘CODEC_ID_LOCO’ was not declared in this scope { CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:222:7: error: ‘CODEC_ID_THEORA’ was not declared in this scope { CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:224:7: error: ‘CODEC_ID_WNV1’ was not declared in this scope { CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:225:7: error: ‘CODEC_ID_AASC’ was not declared in this scope { CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:226:7: error: ‘CODEC_ID_INDEO2’ was not declared in this scope { CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:227:7: error: ‘CODEC_ID_FRAPS’ was not declared in this scope { CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:228:7: error: ‘CODEC_ID_TRUEMOTION2’ was not declared in this scope { CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:231:7: error: ‘CODEC_ID_FLASHSV’ was not declared in this scope { CODEC_ID_FLASHSV, MKTAG('F', 'S', 'V', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:232:7: error: ‘CODEC_ID_JPEGLS’ was not declared in this scope { CODEC_ID_JPEGLS,MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - encoder */ ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:233:7: error: ‘CODEC_ID_VC1’ was not declared in this scope { CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:234:7: error: ‘CODEC_ID_VC1’ was not declared in this scope { CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:235:7: error: ‘CODEC_ID_CSCD’ was not declared in this scope { CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:236:7: error: ‘CODEC_ID_ZMBV’ was not declared in this scope { CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:237:7: error: ‘CODEC_ID_KMVC’ was not declared in this scope { CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:240:7: error: ‘CODEC_ID_VP5’ was not declared in this scope { CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:241:7: error: ‘CODEC_ID_VP6’ was not declared in this scope { CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:242:7: error: ‘CODEC_ID_VP6’ was not declared in this scope { CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:243:7: error: ‘CODEC_ID_VP6’ was not declared in this scope { CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:244:7: error: ‘CODEC_ID_VP6F’ was not declared in this scope { CODEC_ID_VP6F, MKTAG('V', 'P', '6', 'F') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:245:7: error: ‘CODEC_ID_JPEG2000’ was not declared in this scope { CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:246:7: error: ‘CODEC_ID_VMNC’ was not declared in this scope { CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:250:7: error: ‘CODEC_ID_TARGA’ was not declared in this scope { CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, ^ /home/aman/opencv/opencv/modules/videoio/src/ffmpeg_codecs.hpp:252:7: error: ‘CODEC_ID_NONE’ was not declared in this scope { CODEC_ID_NONE, 0 }, ^ In file included from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:0: /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::getProperty(int) const’: /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:784:33: error: ‘AVStream’ has no member named ‘r_frame_rate’ return av_q2d(video_st->r_frame_rate); ^ /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘double CvCapture_FFMPEG::get_fps() const’: /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:831:49: error: ‘AVStream’ has no member named ‘r_frame_rate’ double fps = r2d(ic->streams[video_stream]->r_frame_rate); ^ /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In function ‘AVStream* icv_add_video_stream_FFMPEG(AVFormatContext*, AVCodecID, int, int, int, double, int)’: /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1220:24: error: ‘CODEC_ID_H264’ was not declared in this scope if (c->codec_id == CODEC_ID_H264) { ^ In file included from /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:0: /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In function ‘int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)’: /home/aman/opencv/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1269:72: error: ‘avcodec_encode_video’ was not declared in this scope out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture); ^ modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:169: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o' failed make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1 CMakeFiles/Makefile2:2452: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 Makefile:133: recipe for target 'all' failed make: *** [all] Error 2 When installing the dependencies it was saying that libtiff4-dev can't be found so I followed the suggestion as it said to install libtiff5-dev And similar was the problem with some other dependency libxine-dev so I installed the given alternative libxine2-dev. How can I solve this?
This is because libav has changed API and removed some stuff it's still used in OpenCV. Ubuntu 14.10 uses libav API version 11 and OpenCV still uses API version 9. The problem is that CODEC_ID_* was changed to AV_CODEC_ID_*. I would suggest installing the OpenCV that are already in the Ubuntu repository: sudo apt-get install libopencv-dev p.s.: you can read more about in OpenCV DevZone
You can compile OpenCV without ffmpeg. You can disable ffmpeg by providing -D WITH_FFMPEG=OFF with cmake. Please refer the link below for more details, https://github.com/Itseez/opencv/issues/4940
Biopython SeqIO processing NNNNN in *.ab1 files
Thanks for your help. I apologize in advance if there is a function built into Biopython that handles this, I read the whole manual and couldn't find anything. Goal: Read in a raw sequencing file (*.ab1) and process using sequence.seq.translate(11) However, I get this error - "Bio.Data.CodonTable.TranslationError: Codon 'NNN' is invalid" My Solution: I added an additional table to the CodonTable and commented out the ambiguous checker in Bio.Data.CodonTable (had to do this to make it work) register_ncbi_table( name = 'bacteria sequencing table', alt_name = None, id = 24, table = { 'TTT': 'F', 'TTC': 'F', 'TTA': 'L', 'TTG': 'L', 'TCT': 'S', 'TCC': 'S', 'TCA': 'S', 'TCG': 'S', 'TAT': 'Y', 'TAC': 'Y', 'TGT': 'C', 'TGC': 'C', 'TGG': 'W', 'CTT': 'L', 'CTC': 'L', 'CTA': 'L', 'CTG': 'L', 'CCT': 'P', 'CCC': 'P', 'CCA': 'P', 'CCG': 'P', 'CAT': 'H', 'CAC': 'H', 'CAA': 'Q', 'CAG': 'Q', 'CGT': 'R', 'CGC': 'R', 'CGA': 'R', 'CGG': 'R', 'ATT': 'I', 'ATC': 'I', 'ATA': 'I', 'ATG': 'M', 'ACT': 'T', 'ACC': 'T', 'ACA': 'T', 'ACG': 'T', 'AAT': 'N', 'AAC': 'N', 'AAA': 'K', 'AAG': 'K', 'AGT': 'S', 'AGC': 'S', 'AGA': 'R', 'AGG': 'R', 'GTT': 'V', 'GTC': 'V', 'GTA': 'V', 'GTG': 'V', 'GCT': 'A', 'GCC': 'A', 'GCA': 'A', 'GCG': 'A', 'GAT': 'D', 'GAC': 'D', 'GAA': 'E', 'GAG': 'E', 'GGT': 'G', 'GGC': 'G', 'GGA': 'G', 'GGG': 'G', 'AAN': 'X', 'TAN': 'X', 'GAN': 'X', 'CAN': 'X', 'ATN': 'X', 'TTN': 'X', 'GTN': 'X', 'CTN': 'X', 'ACN': 'X', 'TCN': 'X', 'GCN': 'X', 'CCN': 'X', 'AGN': 'X', 'TGN': 'X', 'GGN': 'X', 'CGN': 'X', 'ANA': 'X', 'TNA': 'X', 'GNA': 'X', 'CNA': 'X', 'ANT': 'X', 'TNT': 'X', 'GNT': 'X', 'CNT': 'X', 'ANC': 'X', 'TNC': 'X', 'GNC': 'X', 'CNC': 'X', 'ANG': 'X', 'TNG': 'X', 'GNG': 'X', 'CNG': 'X', 'NAA': 'X', 'NTA': 'X', 'NGA': 'X', 'NCA': 'X', 'NAT': 'X', 'NTT': 'X', 'NGT': 'X', 'NCT': 'X', 'NAC': 'X', 'NTC': 'X', 'NGC': 'X', 'NCC': 'X', 'NAG': 'X', 'NTG': 'X', 'NGG': 'X', 'NCG': 'X', 'NNN': 'X', 'ANN': 'X', 'TNN': 'X', 'GNN': 'X', 'CNN': 'X', 'NAN': 'X', 'NTN': 'X', 'NGN': 'X', 'NCN': 'X', 'NNA': 'X', 'NNT': 'X', 'NNG': 'X', 'NNC': 'X', 'NNN': 'X'}, stop_codons = ['TAA', 'TAG', 'TGA'], start_codons = ['TTG', 'CTG', 'ATT', 'ATC', 'ATA', 'ATG', 'GTG']) ambiguous checker for n in ambiguous_generic_by_id: assert ambiguous_rna_by_id[n].forward_table["GUU"] == "V" assert ambiguous_rna_by_id[n].forward_table["GUN"] == "V" if n != 23 : #For table 23, UUN = F, L or stop. assert ambiguous_rna_by_id[n].forward_table["UUN"] == "X" # F or L #R = A or G, so URR = UAA or UGA / TRA = TAA or TGA = stop codons if "UAA" in unambiguous_rna_by_id[n].stop_codons and\ "UGA" in unambiguous_rna_by_id[n].stop_codons: try: print(ambiguous_dna_by_id[n].forward_table["TRA"]) assert False, "Should be a stop only" except KeyError: pass assert "URA" in ambiguous_generic_by_id[n].stop_codons assert "URA" in ambiguous_rna_by_id[n].stop_codons assert "TRA" in ambiguous_generic_by_id[n].stop_codons assert "TRA" in ambiguous_dna_by_id[n].stop_codons del n Question 1: I would prefer not to edit the root CodonTable.py file. Any suggestions on how to avoid that? Question 2: I really don't want to comment out the ambiguous checker. Can someone help me write an exception to the ambiguous checker that will ignore my new codon table?
When you load an ABI file, Biopython set the Seq alphabet as IUPACUnambiguousDNA(). My first approach is to set the alphabet to SingleLetterAlphabet(): from Bio import SeqIO from Bio.Alphabet import SingleLetterAlphabet for rec in SeqIO.parse("prots.ab1", "abi", alphabet=SingleLetterAlphabet()): print rec.seq.translate(11) Now the seq translates with "X" and "N".