{"action":"opened","issue":{"url":"https://api.github.com/repos/schelhorn/virana/issues/1","labels_url":"https://api.github.com/repos/schelhorn/virana/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/schelhorn/virana/issues/1/comments","events_url":"https://api.github.com/repos/schelhorn/virana/issues/1/events","html_url":"https://github.com/schelhorn/virana/issues/1","id":59228389,"number":1,"title":"vamp rnamap error : pysam/calignmentfile.pyx single-end","user":{"login":"fcg-bio","id":1126319,"avatar_url":"https://avatars.githubusercontent.com/u/1126319?v=3","gravatar_id":"","url":"https://api.github.com/users/fcg-bio","html_url":"https://github.com/fcg-bio","followers_url":"https://api.github.com/users/fcg-bio/followers","following_url":"https://api.github.com/users/fcg-bio/following{/other_user}","gists_url":"https://api.github.com/users/fcg-bio/gists{/gist_id}","starred_url":"https://api.github.com/users/fcg-bio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcg-bio/subscriptions","organizations_url":"https://api.github.com/users/fcg-bio/orgs","repos_url":"https://api.github.com/users/fcg-bio/repos","events_url":"https://api.github.com/users/fcg-bio/events{/privacy}","received_events_url":"https://api.github.com/users/fcg-bio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T12:10:08Z","updated_at":"2015-02-27T12:10:08Z","closed_at":null,"body":"I am trying to run 'vmap rnamap' with the example that you provide in your README.md\r\n```bash\r\n$vsim reads -r 9626953:5 -r 13095578:5 -r 29502191:50 -r 336087897:50 --read_length=200 -o viral_reads\r\n$vref fasta -r Homo_sapiens -r Viruses -o my_genome_db.fa\r\n$vmap rnaindex -r my_genome_db.fa -i my_rna_index_dir\r\n$vmap rnamap --index my_rna_index_dir --zipped \\\r\n  --reads=viral_reads_1.fq.gz --reads=viral_reads_2.fq.gz \\\r\n  --virana_hits=hits.bz2\r\n```\r\nThis works fine, but when I run it for single end :\r\n```bash\r\n$vmap rnamap --index my_rna_index_dir --zipped \\\r\n  --reads=viral_reads_1.fq.gz  \\\r\n  --virana_hits=hits.bz2   \\\r\n  -d\r\n```\r\nI got the following error:\r\n```bash\r\nvmap rnamap --index_dir my_rna_index_dir \\\r\n>   --reads=viral_reads_1.fq.gz \\\r\n>   --zipped \\\r\n>   --star_path='STAR' \\\r\n>   --samtools_path='samtools' \\\r\n>   --taxonomy=taxonomy.txt \\\r\n>   --bam=mapping.bam \\\r\n>   --threads=8 \\\r\n>   --sensitive \\\r\n>   --virana_hits=hits.bz2 \\\r\n>   --virana_hit_filter=Viruses \\\r\n>   --sample_id=sample_1 \\\r\n>   --min_continiously_matching=25 \\\r\n>   --max_relative_mismatches=0.2 \\\r\n>   -d\r\nRunning mapper\r\nRunning mapper command line: STAR --runMode alignReads --genomeDir my_rna_index_dir --runThreadN 8 --readMatesLengthsIn NotEqual --outFileNamePrefix /tmp/tmpy1CLeE/out --outSAMmode Full --outSAMstrandField None --outSAMattributes Standard --outSAMunmapped Within --outStd SAM --outFilterMultimapNmax 1000 --outSAMprimaryFlag OneBestScore --limitOutSAMoneReadBytes 1000000 --limitOutSJcollapsed 2000000 --genomeLoad NoSharedMemory --outReadsUnmapped None --readFilesCommand zcat --outFilterMultimapScoreRange 10 --outFilterMismatchNmax 60 --outFilterMismatchNoverLmax 0.3 --outFilterScoreMin 0 --outFilterScoreMinOverLread 0.3 --outFilterMatchNmin 0 --outFilterMatchNminOverLread 0.66 --seedSearchStartLmax 12 --winAnchorMultimapNmax 50 --readFilesIn viral_reads_1.fq.gz\r\nPreparing fifo\r\nOpening fifo for writing\r\nOpened fifo /tmp/tmpy1CLeE/namedpipe\r\nStarting mapper process...\r\nExecuted mapper with: STAR --runMode alignReads --genomeDir my_rna_index_dir --runThreadN 8 --readMatesLengthsIn NotEqual --outFileNamePrefix /tmp/tmpy1CLeE/out --outSAMmode Full --outSAMstrandField None --outSAMattributes Standard --outSAMunmapped Within --outStd SAM --outFilterMultimapNmax 1000 --outSAMprimaryFlag OneBestScore --limitOutSAMoneReadBytes 1000000 --limitOutSJcollapsed 2000000 --genomeLoad NoSharedMemory --outReadsUnmapped None --readFilesCommand zcat --outFilterMultimapScoreRange 10 --outFilterMismatchNmax 60 --outFilterMismatchNoverLmax 0.3 --outFilterScoreMin 0 --outFilterScoreMinOverLread 0.3 --outFilterMatchNmin 0 --outFilterMatchNminOverLread 0.66 --seedSearchStartLmax 12 --winAnchorMultimapNmax 50 --readFilesIn viral_reads_1.fq.gz\r\nSetting outputs\r\nOpening input SAM parser and fifo\r\nParsing mapper output from pysam fifo /tmp/tmpy1CLeE/namedpipe\r\nExtracting header from pysam fifo...\r\nFinished extracting header of length 4\r\nOutputting taxonomy to taxonomy.txt\r\nOutputting virana hits to hits.bz2\r\nOutputting BAM file to mapping.bam\r\nStarting to parse with pysam...\r\nParsing SAM file alignments...\r\nProcessed 0 SAM alignments\r\nTraceback (most recent call last):\r\n  File \"/home/fcastro/bin/vmap\", line 5, in <module>\r\n    virana.vmap.CLI.run()\r\n  File \"/usr/local/lib/python2.7/dist-packages/plumbum/cli/application.py\", line 352, in run\r\n    inst, retcode = subapp.run(argv, exit = False)\r\n  File \"/usr/local/lib/python2.7/dist-packages/plumbum/cli/application.py\", line 348, in run\r\n    retcode = inst.main(*tailargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/Virana-1.1.0-py2.7.egg/virana/vmap.py\", line 1347, in main\r\n    for alignment, parsed_line in parser.parse():\r\n  File \"/usr/local/lib/python2.7/dist-packages/Virana-1.1.0-py2.7.egg/virana/vmap.py\", line 346, in parse\r\n    mate_ref_name       = getrname(alignment.rnext)\r\n  File \"pysam/calignmentfile.pyx\", line 570, in pysam.calignmentfile.AlignmentFile.getrname (pysam/calignmentfile.c:7987)\r\nValueError: reference_id -1 out of range 0<=tid<1974\r\n\r\n```\r\nI am using latest virana version, STAR 2.4.0j , samtools 1.2, pysam 0.8.2\r\n\r\nIt is an issue generated by the last updates of pysam or I am doing something wrong?\r\n\r\nThanks"}}