{"action":"created","issue":{"url":"https://api.github.com/repos/gpertea/stringtie/issues/7","labels_url":"https://api.github.com/repos/gpertea/stringtie/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/gpertea/stringtie/issues/7/comments","events_url":"https://api.github.com/repos/gpertea/stringtie/issues/7/events","html_url":"https://github.com/gpertea/stringtie/issues/7","id":66090027,"number":7,"title":"SAM error: found spliced alignment without XS attribute","user":{"login":"jingyayeah","id":11781420,"avatar_url":"https://avatars.githubusercontent.com/u/11781420?v=3","gravatar_id":"","url":"https://api.github.com/users/jingyayeah","html_url":"https://github.com/jingyayeah","followers_url":"https://api.github.com/users/jingyayeah/followers","following_url":"https://api.github.com/users/jingyayeah/following{/other_user}","gists_url":"https://api.github.com/users/jingyayeah/gists{/gist_id}","starred_url":"https://api.github.com/users/jingyayeah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingyayeah/subscriptions","organizations_url":"https://api.github.com/users/jingyayeah/orgs","repos_url":"https://api.github.com/users/jingyayeah/repos","events_url":"https://api.github.com/users/jingyayeah/events{/privacy}","received_events_url":"https://api.github.com/users/jingyayeah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-03T06:38:32Z","updated_at":"2015-05-04T14:05:26Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using the assembled transcripts GTF with StringTie to run cuffmerge,but i get error as follows:\r\n\r\n[14:42:00] Loading reference annotation.\r\n[14:42:03] Inspecting reads and determining fragment length distribution.\r\nSAM error on line 470: found spliced alignment without XS attribute\r\nSAM error on line 471: found spliced alignment without XS attribute\r\nSAM error on line 896: found spliced alignment without XS attribute\r\nSAM error on line 897: found spliced alignment without XS attribute\r\nSAM error on line 1218: found spliced alignment without XS attribute\r\n\r\nI use the bam file produced by HISAT,there are some spliced read alignment without  the tag XS .\r\n\r\nas follows:\r\nHWI-7001455:320:HH7WNADXX:1:2110:1668:35148\t99\t3\t9795235\t255\t21M77N105M\t=\t9795423\t314\tGTTACTTTCTCTGTCCCCAAGGGTTTTCACTGAATTCTCAGGATTGCGAAGCTCCTCTGCTTCTCTTCCCTTCGGCAAGAAACTTTCTTCCGATGAGTTCGTTTCCATCGTCTCCTTCCAGACTTC\t;988(.)9:=4@;.>))<<:((-268=@=1=?63<=?>??)3:>?<?88?8=?;1==8;;????3=;>?>?#######################################################\tAS:i:-15\tXN:i:0\tXM:i:1\tXO:i:0\tXG:i:0\tNM:i:1\tMD:Z:23G102\tYS:i:-5\tYT:Z:CP\r\n\r\nI am not sure the sam caused the error of cuffmerge ?"},"comment":{"url":"https://api.github.com/repos/gpertea/stringtie/issues/comments/98718307","html_url":"https://github.com/gpertea/stringtie/issues/7#issuecomment-98718307","issue_url":"https://api.github.com/repos/gpertea/stringtie/issues/7","id":98718307,"user":{"login":"NixBio","id":12229731,"avatar_url":"https://avatars.githubusercontent.com/u/12229731?v=3","gravatar_id":"","url":"https://api.github.com/users/NixBio","html_url":"https://github.com/NixBio","followers_url":"https://api.github.com/users/NixBio/followers","following_url":"https://api.github.com/users/NixBio/following{/other_user}","gists_url":"https://api.github.com/users/NixBio/gists{/gist_id}","starred_url":"https://api.github.com/users/NixBio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixBio/subscriptions","organizations_url":"https://api.github.com/users/NixBio/orgs","repos_url":"https://api.github.com/users/NixBio/repos","events_url":"https://api.github.com/users/NixBio/events{/privacy}","received_events_url":"https://api.github.com/users/NixBio/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T14:05:26Z","updated_at":"2015-05-04T14:05:26Z","body":"HI,\r\n\r\nI used unstranded data from an RNA-Seq experiment:\r\nMapped with tophat2.\r\n\r\nThen, I used StringTie with a reference.gtf to determine expressed and spliced Isoforms. To merge the .gtf files I used cuffmerge:\r\nThis results in: SAM error on line 877: found spliced alignment without XS attribute\r\n\r\n\r\nI searched for the respective gene in the reference.gtf, there the minus strand is used\r\n\r\nReference.gtf\r\n1\tensembl\texon\t31870178\t31870747\t.\t-\t.\ttranscript_id \"Gene1_T01\"; gene_id \"Gene1\"; gene_name \"Gene1\";\r\n1\tensembl\texon\t31874837\t31875517\t.\t-\t.\ttranscript_id \"Gene1_T01\"; gene_id \"Gene1\"; gene_name \"Gene1\";\r\n1\tensembl\tCDS\t31874845\t31875387\t.\t-\t0\ttranscript_id \"Gene1_T01\"; gene_id \"Gene1\"; gene_name \"Gene1\";\r\n\r\nIn the StringTie.gtf this information is lost\r\n\r\nStringTie.gtf\r\n1\tStringTie\ttranscript\t31870178\t31875517\t1000\t.\t.\tgene_id \"AB_1.599\"; transcript_id \"AB_1.599.1\"; reference_id \"Gene1_T01\"; ref_gene_id \"Gene1\"; ref_gene_name \"Gene1\"; cov \"6.554756\"; FPKM \"2.389276\";\r\n1\tStringTie\texon\t31870178\t31870747\t1000\t.\t.\tgene_id \"AB_1.599\"; transcript_id \"AB_1.599.1\"; exon_number \"1\"; reference_id \"Gene1_T01\"; ref_gene_id \"Gene1\"; ref_gene_name \"Gene1\"; cov \"12.215790\";\r\n1\tStringTie\texon\t31874837\t31875517\t1000\t.\t.\tgene_id \"AB_1.599\"; transcript_id \"AB_1.599.1\"; exon_number \"2\"; reference_id \"Gene1_T01\"; ref_gene_id \"Gene1\"; ref_gene_name \"Gene1\"; cov \"1.816446\";\r\n\r\n\r\ncufflinks -o /Alignments/StringTie/Cuffmerge04052015_log1/ -F 0.05 -g /Annotations/genomes/Reference.gtf -q --overhang-tolerance 200 --library-type=transfrags -A 0.0 --min-frags-per-transfrag 0 --no-5-extend -p 4 /Alignments/StringTie/Cuffmerge04052015_log/tmp/gtf2sam_filebgmy70 \r\n[bam_header_read] EOF marker is absent. The input is probably truncated.\r\n[bam_header_read] invalid BAM binary header (this is not a BAM file).\r\nFile /Alignments/StringTie/Cuffmerge04052015_log/tmp/gtf2sam_filebgmy70 doesn't appear to be a valid BAM file, trying SAM...\r\n[15:38:59] Loading reference annotation.\r\n[15:39:04] Inspecting reads and determining fragment length distribution.\r\nSAM error on line 877: found spliced alignment without XS attribute\r\nSAM error on line 877: found spliced alignment without XS attribute\r\n....\r\n\r\nWhen I looked in the respective file I find:\r\n\r\ngtf2sam\r\nAB_1.598.2\t0\t1\t31865715\t255\t107M80N158M172N88M181N74M94N75M91N845M\t*\t0\t0\t*\t*\tXS:A:+\tZF:f:0.959395\r\nAB_1.599.1\t0\t1\t31870178\t255\t570M4089N681M\t*\t0\t0\t*\t*\tZF:f:2.389276\r\nAB_1.600.2\t16\t1\t31977658\t255\t630M2740N99M98N118M95N77M76N144M\t*\t0\t0\t*\t*\tXS:A:-\tZF:f:3.110215\r\n\r\nAs  the entry starting with AB_1.599.1 the XS:A:+ tag is missing!\r\nWhy does StringTie not report the strand information even though it is given?\r\n\r\nstringtie\r\nstringtie  accepted_hits_sort_pairs.bam -o $basedir/Alignments/StringTie/$name.gtf -p 1 -G Reference.gtf -l AB_1 -C $basedir/Alignments/StringTie/AB_1_cov_refs.gtf\r\n\r\ncuffmerge: -o Example_log -g Reference.gtf -p 4 -s Reference.fa GTFlist \r\n\r\nAny Ideas?\r\n\r\nThanks \r\n"}}