I used Hisat2 output sam file directly in cufflinks and getting error: Please suggest what to do?
[root@psgl hisat2]# /home/yog/software/cufflinks-2.2.1.Linux_x86_64/cufflinks -g gene.gtf -p 8 -o
/data/SNU_work/Analysis/unmapped/unmapped/hisat2/assembly/ --no-update-check unmap.sam
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
File unmap.sam doesn't appear to be a valid BAM file, trying SAM...
[06:07:50] Loading reference annotation.
[06:07:51] Inspecting reads and determining fragment length distribution.
Processing Locus R8:5812456-5812792 [ ] 0%
Error: this SAM file doesn't appear to be correctly sorted!
current hit is at R3:14022855, last one was at R8:5822720
Cufflinks requires that if your file has SQ records in
the SAM header that they appear in the same order as the chromosomes names
in the alignments.
If there are no SQ records in the header, or if the header is missing,
the alignments must be sorted lexicographically by chromsome
name and by position.
I suggest you should read the error message.
I did pair end raw read mapping using Hisat2. after I sorted output sam file using below command:
/home/yog/software/samtools-1.3.1/samtools sort unmap.sam > unmap.sort.sam
Sorted sam file is used for cufflinks assembly suing below command:
/home/yog/software/cufflinks-2.2.1.Linux_x86_64/cufflinks -g gene.gtf -p 8 -o /data/SNU_work/Analysis/unmapped/unmapped/hisat2/assembly/ --no-update-check unmap.sort.sam
But it giving some error:
BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute BAM record error: found spliced alignment without XS attribute
Please suggest How I can resolve it?
I can find potential solutions by googling, one appears to be to use the
--dta-cufflinks
flag when mapping using HISAT2. http://ccb.jhu.edu/software/hisat2/manual.shtmlOr,using
--library-type fr-firststrand
for cufflinks C: Cufflinks error: BAM record error: found spliced alignment without XS attributeCufflinks got stuck at this position: Can anyone suggest what is the reason.
command used for pair end raw read mapping:
/home/yog/software/hisat2-2.0.4/hisat2 -p 8 -x Radish_index -1 /data/SNU_work/Analysis/unmapped/unmapped/hisat2/unmap_Read1.fastq -2 /data/SNU_work/Analysis/unmapped/unmapped/hisat2/unmap_Read2.fastq --dta-cufflinks -S mapped.sam
After that sam is converted in bam and sorted bam is used for cufflinks assembly.
Cufflinks command:
[root@psgl hisat2]# /home/yog/software/cufflinks-2.2.1.Linux_x86_64/cufflinks -g gene.gtf -p 8 -o /data/SNU_work/Analysis/unmapped/unmapped/hisat2/assembly/ --no-update-check --library-type fr-firststrand unmap.sort.bam
[00:11:04] Loading reference annotation.
[00:11:06] Inspecting reads and determining fragment length distribution.
do not proceed after that.
If I removed -g gene gtf from command line then its running well.
I think, there might be some problem in gene.gtf file.