sheffield-bioinformatics-core / periscope

A tool to quantify sub-genomic RNA (sgRNA) expression in SARS-CoV-2 artic network amplicon nanopore sequencing data.
GNU General Public License v3.0
16 stars 5 forks source link

split: <filename>.sam illegal line count #49

Open sekstephenson opened 1 year ago

sekstephenson commented 1 year ago

Good day,

I am very new to the bioinformatics field so my apologies if this question/issue is not posed optimally. I am trying to run the pipeline (MacOS) on illumina fastq files and Jobs 1 & 2 are complete, which is the baw mem command line that generates the first .bam file followed by indexing that bam file. However, the next command in the pipeline returns an error during the "split":

Parse error: bad token

:1 split: PscopeResult.sam illegal line count Seems like maybe there was an error during the creation of my .sam file? I can run the following commands separately with success: samtools view -H PscopeResult.bam > PscopeResult_header.txt && samtools view PscopeResult.bam > PscopeResult.sam but as soon as I try to run the next bit: split -d -l $(echo `wc -l PscopeResult.sam | cut -f1 -d " "` /64+1 | bc) PscopeResult.sam PscopeResult.split. I get the error. My command line input was as follows: periscope \ --fastq /Users/sean/periscope/pscopedata/12-04-2022_S1_L001_R1_001.fastq.gz /Users/sean/periscope/pscopedata/12-04-2022_S1_L001_R2_001.fastq.gz \ --output-prefix PscopeResult \ --sample Nov4 \ --artic-primers V4 \ --resources /Users/sean/periscope/periscope/resources \ --technology illumina \ --threads 64 I appreciate any help or guidance with this! Thanks in advance. ![periscope split error](https://user-images.githubusercontent.com/125316256/219125315-2b607fa9-5e7f-4ee3-a9ea-f2997dbe5d69.png)
mbdabrowska1 commented 1 year ago

How big is your sam file? If you run just the first part of the command:

wc -l PscopeResult.sam

seems like this returns just a single line and therefore it cant be split?

sekstephenson commented 1 year ago

If I run that command after generating my .sam file it returns a command line:

337534 PscopeResult.sam

If I open the .sam file in text edit, the file appears to have plenty of lines and is 115 MB in size.