cufflinks in loop
0
0
Entering edit mode
5.9 years ago
suny.bio • 0

I am trying to run the cufflinks program in loop so that I can process all the samples at once with the below shell script. But it's not working. Individually the files working ok.

Please help.

INPUT=/data/test

OUT1=/data/cufflinks_out

ANNOTATION=/data/annotation

for file in $( find `echo $INPUT/*.bam` -type f); 
do 
name=eval basename $file; 
echo $name;
s=${file##*/};
echo ${s%.*};

cufflinks -p 12 \
-G $ANNOTATION/mouse_M17_annotation.gtf \
-o $OUT1/${s%.*} \
$INPUT/$name ;
done
rna-seq RNA-Seq genome • 2.1k views
ADD COMMENT
1
Entering edit mode

Hello suny.bio,

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.

code_formatting

Thank you!

ADD REPLY
1
Entering edit mode

You should know that the old 'Tuxedo' pipeline of Tophat(2) and Cufflinks is no longer the "advisable" tool for RNA-seq analysis. The software is deprecated/ in low maintenance and should be replaced by HISAT2, StringTie and ballgown. See this paper: Transcript-level expression analysis of RNA-seq experiments with HISAT, StringTie and Ballgown. There are also other alternatives, including alignment with STAR and bbmap, or pseudo-alignment using salmon, followed by DESeq2 or edgeR.

ADD REPLY
0
Entering edit mode

I have STAR aligned accepted.bam files and I like to count FPKM from those accepted.bam files. So, I am using cufflinks to produce the FPKM tables. Could you suggest which program I can use to calculate FPKM values from STAR aligned .bam files?

ADD REPLY
1
Entering edit mode

From star aligner, how many outputs do you have? Since anyway, it is not working, move on to stringtie instead of cufflinks. I am suggesting you stringtie not because cufflinks is not working, but because work is not yet started. Better to start with some thing that is recommended by cufflinks authors which is stringtie. @suny.bio

ps: you don't have to apply coding format for normal text.

ADD REPLY
0
Entering edit mode

I have 73 samples and like to run in batches with any other program which will calculate the FPKM. Could you suggest one?

ADD REPLY
1
Entering edit mode

stringtie can output FPKM and two more quantifications @suny.bio.

ADD REPLY
0
Entering edit mode

FPKM is rarely an appropriate normalization method. What is your aim with these counts?

ADD REPLY
0
Entering edit mode

Please post the error

ADD REPLY
0
Entering edit mode

It just stuck it here for a long time every time I tried.

--------------------------------------------
Warning: Could not connect to update server to verify current version. Please check at the Cufflinks website (http://cufflinks.cbcb.umd.edu).
[bam_header_read] bgzf_check_EOF: Invalid argument
[bam_header_read] invalid BAM binary header (this is not a BAM file).
File /data/RNA_Seq/Mouse/single_cell/single_cell_mouse/results/4_aligned_sequences/test/ doesn't appear to be a valid BAM file, trying SAM...
[19:33:15] Loading reference annotation.
[19:33:31] Inspecting reads and determining fragment length distribution.
ADD REPLY
1
Entering edit mode

I added markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

ADD REPLY
0
Entering edit mode

warning is home calling warning. You can ignore that. Second warning is about your bam files. You need to validate bam files provided to the pipe. Try to run cufflinks on one or two bam files instead of loop. If code throws same error again, it is the problem with your bam file (from the error message you have posted). But it seems to me, that you have not posted entire error. If so, post entire error. If entire error is posted, then validate bam files.

edit: Seems bam files are not at all passed to cufflinks, instead a directory name is being passed as input.

ADD REPLY
0
Entering edit mode

There is no output after it saying "Inspecting reads and determining fragment length distribution." same single file with cufflinks processing ok. it's only during the loop not working properly.

ADD REPLY
1
Entering edit mode

$INPUT/$name is not passing bam files to cufflinks. Add echo before links and run the program. You would see that bam file is not passed to cufflinks.

ADD REPLY
1
Entering edit mode

change a line in the loop from name=eval basename $file; to name=$(basename $file). Please take a back up of your code first and then run the modified code on one or two bam files.

ADD REPLY
0
Entering edit mode

Thanks cpad0112. It's now working!!

ADD REPLY

Login before adding your answer.

Traffic: 1411 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6